Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.agent.server
Class AgentDListProvider

java.lang.Object
  extended by org.hyperic.hq.agent.server.AgentDListProvider
All Implemented Interfaces:
AgentStorageProvider, GenericValueMap

public class AgentDListProvider
extends java.lang.Object
implements AgentStorageProvider


Constructor Summary
AgentDListProvider()
           
 
Method Summary
 void addOverloadedInfo(java.lang.String listName, java.lang.String info)
           
 void addToList(java.lang.String listName, java.lang.String value)
          LIST FUNCTIONALITY
 void createList(java.lang.String name, int recSize)
          Create a list of non-standard record size.
 void deleteList(java.lang.String listName)
          Delete an entire list from storage.
 void dispose()
          Perform any cleanup that the storage provider requires.
 void flush()
          Flush values to permanent storage.
 java.lang.String getDescription()
          Get a description of this storage provider.
 java.util.Set getKeys()
           
 java.util.Iterator getListIterator(java.lang.String listName)
          Get an iterator for a named list.
 java.lang.String getValue(java.lang.String key)
          Gets a value from the storage object.
 void init(java.lang.String info)
          DList info string is a series of properties seperated by '|' Three properties are expected.
 void setValue(java.lang.String key, java.lang.String value)
          Sets a value within the storage object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentDListProvider

public AgentDListProvider()
Method Detail

getDescription

public java.lang.String getDescription()
Get a description of this storage provider.

Specified by:
getDescription in interface AgentStorageProvider
Returns:
A string describing the functionality of the object.

createList

public void createList(java.lang.String name,
                       int recSize)
                throws AgentStorageException
Create a list of non-standard record size.

Specified by:
createList in interface AgentStorageProvider
Throws:
AgentStorageException

addOverloadedInfo

public void addOverloadedInfo(java.lang.String listName,
                              java.lang.String info)
Specified by:
addOverloadedInfo in interface AgentStorageProvider

setValue

public void setValue(java.lang.String key,
                     java.lang.String value)
Sets a value within the storage object.

Specified by:
setValue in interface AgentStorageProvider
Specified by:
setValue in interface GenericValueMap
Parameters:
key - Key of the value to set.
value - Value to set for 'key'.

getValue

public java.lang.String getValue(java.lang.String key)
Gets a value from the storage object.

Specified by:
getValue in interface AgentStorageProvider
Specified by:
getValue in interface GenericValueMap
Parameters:
key - Key of the value to get.
Returns:
The value associated with the key for the subsystem.

getKeys

public java.util.Set getKeys()
Specified by:
getKeys in interface AgentStorageProvider
Specified by:
getKeys in interface GenericValueMap
Returns:
A set of all keys in the storage provider.

flush

public void flush()
           throws AgentStorageException
Description copied from interface: AgentStorageProvider
Flush values to permanent storage. Implementers of this interface may cache properties internally -- this method gives them a chance to store it to permanent storage before it gets lost.

Specified by:
flush in interface AgentStorageProvider
Throws:
AgentStorageException

init

public void init(java.lang.String info)
          throws AgentStorageException
DList info string is a series of properties seperated by '|' Three properties are expected. Directory to place the data files Size in MB to start checking for unused blocks Maximum percentage of free blocks allowed Default is 'data|20|50'

Specified by:
init in interface AgentStorageProvider
Parameters:
info - parameters for the StorageProvider to store data and index files
Throws:
AgentStorageException

dispose

public void dispose()
Description copied from interface: AgentStorageProvider
Perform any cleanup that the storage provider requires.

Specified by:
dispose in interface AgentStorageProvider

addToList

public void addToList(java.lang.String listName,
                      java.lang.String value)
               throws AgentStorageException
LIST FUNCTIONALITY

Specified by:
addToList in interface AgentStorageProvider
Parameters:
listName - Name of the column to add to
value - Value to add to the column
Throws:
AgentStorageException

deleteList

public void deleteList(java.lang.String listName)
Description copied from interface: AgentStorageProvider
Delete an entire list from storage. This is basically a shortcut for deleting all elements as returned by getListIterator()

Specified by:
deleteList in interface AgentStorageProvider

getListIterator

public java.util.Iterator getListIterator(java.lang.String listName)
Description copied from interface: AgentStorageProvider
Get an iterator for a named list. If there is no list currently in storage, or the list contains 0 elements, null will be returned.

Specified by:
getListIterator in interface AgentStorageProvider
Parameters:
listName - name of the list to get an iterator for.

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.