org.bitrepository.monitoringservice.status
Class ComponentStatusStore

java.lang.Object
  extended by org.bitrepository.monitoringservice.status.ComponentStatusStore
All Implemented Interfaces:
StatusStore

public class ComponentStatusStore
extends Object
implements StatusStore

Storage for the status of the different components.


Constructor Summary
ComponentStatusStore(Set<String> components)
          Constructor.
 
Method Summary
 Map<String,ComponentStatus> getStatusMap()
           
 void updateReplyCounts()
          Tells the store that new statuses have been requested from the components.
 void updateStatus(String componentID, ResultingStatus status)
          Updates the status of a given component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentStatusStore

public ComponentStatusStore(Set<String> components)
Constructor.

Parameters:
components - The components whose status are to be stored in this store.
Method Detail

updateStatus

public void updateStatus(String componentID,
                         ResultingStatus status)
Description copied from interface: StatusStore
Updates the status of a given component.

Specified by:
updateStatus in interface StatusStore
Parameters:
componentID - The id of the component to update.
status - The resulting status for the given component.

updateReplyCounts

public void updateReplyCounts()
Description copied from interface: StatusStore
Tells the store that new statuses have been requested from the components. This should increase the 'missingReplies' for each component, and whenever the component delivers its reply, then the 'missingReplies' are set to zero again.

Specified by:
updateReplyCounts in interface StatusStore

getStatusMap

public Map<String,ComponentStatus> getStatusMap()
Specified by:
getStatusMap in interface StatusStore
Returns:
The mapping between components and their status.


Copyright © 2010-2013 The State and University Library, The Royal Library and The State Archives, Denmark. All Rights Reserved.