Classes | Public Member Functions | Protected Member Functions

alma.acs.monitoring.blobber.CollectorList Class Reference

List of all members.

Classes

class  BlobData
class  CollectorData

Public Member Functions

 CollectorList ()
CollectorListStatus add (String inCollectorName)
CollectorListStatus add (CollectorData inData)
CollectorListStatus contains (String inCollectorName)
CollectorListStatus remove (String inCollectorName)
int size ()
CollectorData next ()
boolean hasNext ()
void resetIterator ()

Protected Member Functions

CollectorListStatus contains (CollectorData inData)
synchronized CollectorListStatus remove (CollectorData inData)

Detailed Description

This class encapsulates a CursorableLinkedList<CollectorData>, which holds all monitor collector references together with their data that got harvested by a blobber. It allows calls to add(CollectorData) and remove(CollectorData) while iterating over the list of CollectorData objects using methods next() or hasNext().

The only added value compared to using the CursorableLinkedList directly is the synchronization of concurrent calls and the type casts (CursorableLinkedList does not support generics).


Constructor & Destructor Documentation

alma.acs.monitoring.blobber.CollectorList.CollectorList (  ) 

Member Function Documentation

CollectorListStatus alma.acs.monitoring.blobber.CollectorList.add ( String  inCollectorName  ) 

Creates and adds a CollectorData object for the given collector ID.

See also:
add(CollectorData)

Referenced by alma.acs.monitoring.blobber.BlobberWorker.addCollector().

CollectorListStatus alma.acs.monitoring.blobber.CollectorList.add ( CollectorData  inData  ) 
Parameters:
inData The object that identifies a collector and holds its data.
Returns:
ADDED if the CollectorData object was added to this list, or KNOWN if it was already in the list.
CollectorListStatus alma.acs.monitoring.blobber.CollectorList.contains ( CollectorData  inData  )  [protected]

This method is currently used only from contains(String). Make it public if it should be used from outside.

CollectorListStatus alma.acs.monitoring.blobber.CollectorList.contains ( String  inCollectorName  ) 
Parameters:
inCollectorName The ID of the collector for which we check the list.
Returns:
KNOWN if the given collector is already in this list, or UNKNOWN otherwise.

Referenced by alma.acs.monitoring.blobber.BlobberWorker.containsCollector().

boolean alma.acs.monitoring.blobber.CollectorList.hasNext (  ) 
Returns:
true if a subsequent call to next() will return another CollectorData object from the current iteration; false otherwise.

Referenced by alma.acs.monitoring.blobber.BlobberWorker.run().

CollectorData alma.acs.monitoring.blobber.CollectorList.next (  ) 
Returns:
The next CollectorData from the list.
Exceptions:
NoSuchElementException if we are at the end of the list. Should have checked with hasNext(), and called resetIterator().

Referenced by alma.acs.monitoring.blobber.BlobberWorker.run().

CollectorListStatus alma.acs.monitoring.blobber.CollectorList.remove ( String  inCollectorName  ) 
Parameters:
inCollectorName 
Returns:
REMOVED if the given collector was in this list and got removed, or UNKNOWN otherwise.

Referenced by alma.acs.monitoring.blobber.BlobberWorker.removeCollector().

synchronized CollectorListStatus alma.acs.monitoring.blobber.CollectorList.remove ( CollectorData  inData  )  [protected]

This method is currently used only from remove(String). Make it public if it should be used from outside.

void alma.acs.monitoring.blobber.CollectorList.resetIterator (  ) 
int alma.acs.monitoring.blobber.CollectorList.size (  ) 
Returns:
The number of monitor collectors in this list.

Referenced by alma.acs.monitoring.blobber.BlobberWorker.canHandle().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties