|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.ecs.iam.grid.client.staterepos.AbstractStateRepository
uk.ac.soton.ecs.iam.grid.client.staterepos.MemoryStateRepository
public class MemoryStateRepository
This is the simplest available StateRepository, which does no long-term storage. It is mainly useful for testing.
| Field Summary | |
|---|---|
protected HashMap<URL,StorableInStateRepository> |
objects
|
protected Hashtable<QName,String> |
properties
|
| Fields inherited from class uk.ac.soton.ecs.iam.grid.client.staterepos.AbstractStateRepository |
|---|
log |
| Constructor Summary | |
|---|---|
MemoryStateRepository()
|
|
| Method Summary | ||
|---|---|---|
protected void |
addObjectInternal(StorableInStateRepository object)
|
|
void |
checkForUpdates()
Since a MemoryStateRepository is always up-to-date, this method does nothing. |
|
protected void |
deleteConversation(Conversation conversation)
Remove conversation from the StateRepository. |
|
void |
dump()
For debugging |
|
StorableInStateRepository[] |
getAll()
Returns all items in the state repository |
|
StorableInStateRepository[] |
getByParent(URL parentID)
Returns a list of all children of the given conversation. |
|
|
getByType(Class<T> type)
|
|
Conversation |
getConversationByID(URL cid)
Returns the Conversation object corresponding to the given URL. |
|
|
getConversationsByType(Class<T> type)
Return all conversations of the given type (a subclass of Conversation). |
|
StorableInStateRepository |
getObject(URL id)
Get an object based on its URL. |
|
String |
getProperty(QName name)
Get a property set with setProperty. |
|
StorableInStateRepository[] |
getToplevel()
Returns an array of all top-level object (those whose parent is null). |
|
protected void |
notifyChangedInternal(StorableInStateRepository object)
|
|
protected void |
removeObjectInternal(StorableInStateRepository object)
|
|
void |
setProperty(QName name,
String value)
Set a general property on the repository. |
|
| Methods inherited from class uk.ac.soton.ecs.iam.grid.client.staterepos.AbstractStateRepository |
|---|
addListener, addObject, getAccountConversations, getOrCreateObject, getOrCreateObject, instantiateObject, instantiateObject, notifyChanged, notifyChanged, notifyListeners, notifyListeners, removeListener, removeObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected HashMap<URL,StorableInStateRepository> objects
protected Hashtable<QName,String> properties
| Constructor Detail |
|---|
public MemoryStateRepository()
| Method Detail |
|---|
public Conversation getConversationByID(URL cid)
throws NoSuchConversation
StateRepository
getConversationByID in interface StateRepositorygetConversationByID in class AbstractStateRepositoryNoSuchConversation
public StorableInStateRepository getObject(URL id)
throws NoSuchConversation
StateRepository
NoSuchConversation - if no object has this ID.public <T extends Conversation> T[] getConversationsByType(Class<T> type)
StateRepository
public <T extends StorableInStateRepository> T[] getByType(Class<T> type)
public StorableInStateRepository[] getToplevel()
StateRepository
public StorableInStateRepository[] getAll()
StateRepository
getAll in interface StateRepositorygetAll in class AbstractStateRepository
public StorableInStateRepository[] getByParent(URL parentID)
throws NoSuchConversation
StateRepository
getByParent in interface StateRepositorygetByParent in class AbstractStateRepositoryNoSuchConversation
protected void addObjectInternal(StorableInStateRepository object)
throws ObjectAlreadyExists
addObjectInternal in class AbstractStateRepositoryObjectAlreadyExists
protected void deleteConversation(Conversation conversation)
throws NoSuchConversation
AbstractStateRepository
deleteConversation in class AbstractStateRepositoryNoSuchConversation
protected void removeObjectInternal(StorableInStateRepository object)
throws NoSuchConversation
removeObjectInternal in class AbstractStateRepositoryNoSuchConversationpublic void dump()
AbstractStateRepository
dump in class AbstractStateRepositoryprotected void notifyChangedInternal(StorableInStateRepository object)
notifyChangedInternal in class AbstractStateRepositorypublic void checkForUpdates()
checkForUpdates in interface StateRepositorycheckForUpdates in class AbstractStateRepository
public void setProperty(QName name,
String value)
StateRepository
name - a unique name for the propertyvalue - the value of the property (null to unset)public String getProperty(QName name)
StateRepository
name - the name passed to setProperty
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||