Package com.attivio.sysstate
Class ComponentRuntimeState
- java.lang.Object
-
- com.attivio.sysstate.ComponentRuntimeState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ComponentRuntimeState>
public class ComponentRuntimeState extends java.lang.Object implements java.lang.Comparable<ComponentRuntimeState>, java.io.Serializable
Holds the dynamic component state for a particular component. Thread-safe.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ComponentRuntimeState(java.lang.String componentName, int maxInstances)
Constructs a ComponentRuntimeState with the given name and maximum number of instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeState(InstanceState state)
int
compareTo(ComponentRuntimeState arg0)
boolean
equals(java.lang.Object obj)
java.lang.String
getComponentName()
long
getDocumentsProcessed()
long
getInputWaitTime()
long
getMessagesProcessed()
long
getProcessingTime()
long
getSendingTime()
int
hashCode()
void
incrementDocumentCount()
Increments the number of documents that have been processed by this component.void
incrementMessageCount()
Increments the number of messages that have been processed by this component.void
returnCounter()
java.lang.String
toString()
-
-
-
Constructor Detail
-
ComponentRuntimeState
public ComponentRuntimeState(java.lang.String componentName, int maxInstances)
Constructs a ComponentRuntimeState with the given name and maximum number of instances. The maximum number of instances is critical in computing the correct time spent in various states.- Parameters:
componentName
-maxInstances
-
-
-
Method Detail
-
returnCounter
public void returnCounter()
-
changeState
public void changeState(InstanceState state)
-
incrementMessageCount
public void incrementMessageCount()
Increments the number of messages that have been processed by this component.
-
incrementDocumentCount
public void incrementDocumentCount()
Increments the number of documents that have been processed by this component.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getComponentName
public java.lang.String getComponentName()
-
getMessagesProcessed
public long getMessagesProcessed()
-
getDocumentsProcessed
public long getDocumentsProcessed()
-
getProcessingTime
public long getProcessingTime()
-
getSendingTime
public long getSendingTime()
-
getInputWaitTime
public long getInputWaitTime()
-
compareTo
public int compareTo(ComponentRuntimeState arg0)
- Specified by:
compareTo
in interfacejava.lang.Comparable<ComponentRuntimeState>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-