Class VmChannel

java.lang.Object
org.jgrapes.core.Subchannel.DefaultSubchannel
org.jdrupes.vmoperator.manager.events.VmChannel
All Implemented Interfaces:
Associator, Channel, Eligible, Subchannel

A subchannel used to send the events related to a specific VM.
  • Constructor Details

    • VmChannel

      public VmChannel(Channel mainChannel, EventPipeline pipeline, K8sClient client)
      Instantiates a new watch channel.
      Parameters:
      mainChannel - the main channel
      pipeline - the pipeline
      client - the client
  • Method Details

    • setVmDefinition

      Sets the last known definition of the resource.
      Parameters:
      definition - the definition
      Returns:
      the watch channel
    • vmDefinition

      Returns the last known definition of the VM.
      Returns:
      the json object
    • generation

      public long generation()
      Gets the last processed generation.

      Returns -1 if no definition has been processed yet.

      Returns:
      the generation
    • setGeneration

      public boolean setGeneration(long generation)
      Sets the last processed generation.
      Parameters:
      generation - the generation to set
      Returns:
      true if value has changed
    • pipeline

      Returns the pipeline.
      Returns:
      the event pipeline
    • client

      public K8sClient client()
      Returns the API client.
      Returns:
      the API client