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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapes.core.Channel
Channel.Default
Nested classes/interfaces inherited from interface org.jgrapes.core.Subchannel
Subchannel.DefaultSubchannel
-
Field Summary
-
Constructor Summary
ConstructorDescriptionVmChannel
(Channel mainChannel, EventPipeline pipeline, K8sClient client) Instantiates a new watch channel. -
Method Summary
Modifier and TypeMethodDescriptionclient()
Returns the API client.long
Gets the last processed generation.pipeline()
Returns the pipeline.boolean
setGeneration
(long generation) Sets the last processed generation.setVmDefinition
(VmDefinition definition) Sets the last known definition of the resource.Returns the last known definition of the VM.Methods inherited from class org.jgrapes.core.Subchannel.DefaultSubchannel
associated, mainChannel, setAssociated, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associatedGet
Methods inherited from interface org.jgrapes.core.Subchannel
defaultCriterion, isEligibleFor
-
Constructor Details
-
VmChannel
Instantiates a new watch channel.- Parameters:
mainChannel
- the main channelpipeline
- the pipelineclient
- 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 defintion
-
generation
Gets the last processed generation.Returns -1 if no definition has been processed yet.
- Returns:
- the generation
-
setGeneration
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
Returns the API client.- Returns:
- the API client
-