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 voidchangeState(InstanceState state)intcompareTo(ComponentRuntimeState arg0)booleanequals(java.lang.Object obj)java.lang.StringgetComponentName()longgetDocumentsProcessed()longgetInputWaitTime()longgetMessagesProcessed()longgetProcessingTime()longgetSendingTime()inthashCode()voidincrementDocumentCount()Increments the number of documents that have been processed by this component.voidincrementMessageCount()Increments the number of messages that have been processed by this component.voidreturnCounter()java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein 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:
compareToin interfacejava.lang.Comparable<ComponentRuntimeState>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-