|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorca.shirako.plugins.db.MemoryDatabase
public class MemoryDatabase
| Nested Class Summary | |
|---|---|
protected class |
MemoryDatabase.SliceData
|
| Field Summary | |
|---|---|
protected java.lang.String |
actorName
|
protected java.util.Hashtable |
inventorySlices
|
protected LoggingTool |
logger
|
protected boolean |
resetState
|
protected java.util.Hashtable |
slices
|
| Constructor Summary | |
|---|---|
MemoryDatabase()
|
|
| Method Summary | |
|---|---|
void |
actorAdded()
Performs initialization actions as a result of the actor being added to the container. |
void |
addBroker(IBrokerProxy broker)
Adds a new broker proxy record. |
void |
addConfigurationMapping(java.lang.String key,
ConfigurationMapping map)
Adds a new configuration mapping record. |
void |
addReservation(ResourceReservation reservation)
Adds a new record to the database representing this reservation object. |
void |
addSlice(Slice slice)
Adds a new record to the database representing this slice object. |
java.util.Vector |
getAgentReservations()
Retrieves all reservations for which this actor acts as a broker. |
java.util.Vector |
getAuthorityReservations()
Retrieves all reservations for which this actor acts as a site. |
java.util.Vector |
getBrokers()
Retrieves all broker proxies. |
java.util.Vector |
getClientReservations()
Retrieves all reservations that represent clients of this actor. |
java.util.Vector |
getClientSlices()
Retrieves all client slice records. |
java.util.Vector |
getConfigurationMapping(java.lang.String key)
Retrieves the specified configuration mapping record. |
java.util.Vector |
getConfigurationMappings()
Retrieves all configuration mapping records. |
java.util.Vector |
getHoldings()
Retrieves all reservations representing resources held by this actor Broker/service manager. |
java.util.Vector |
getInventorySlices()
Retrieves all inventory slice records. |
LoggingTool |
getLogger()
Obtains the logger object used by the database layer implementation. |
java.util.Vector |
getReservation(ReservationID rid)
Retrieves the specified reservation record. |
java.util.Vector |
getReservation(java.lang.String sliceName,
ReservationID rid)
|
java.util.Vector |
getReservations()
Retrieves all reservation records. |
java.util.Vector |
getReservations(Slice slice)
|
java.util.Vector |
getReservations(SliceID sliceID)
Retrieves all reservation records that belong to the specified slice. |
java.util.Vector<java.util.Properties> |
getSlice(ResourceType type)
Retrieves the specified slice record. |
java.util.Vector |
getSlice(SliceID sliceID)
Retrieves the specified slice record. |
protected MemoryDatabase.SliceData |
getSliceData(Slice slice)
|
protected MemoryDatabase.SliceData |
getSliceData(java.lang.String sliceName)
|
java.util.Vector |
getSlices()
Retrieves all slice records. |
void |
initialize()
Initializes the object. |
void |
registerReservationListener(IStateChangeListener listener)
Registers a state change listener |
void |
removeBroker(IBrokerProxy broker)
Removes the specified broker proxy record. |
void |
removeConfigurationMapping(java.lang.String key)
Removes the specified configuration mapping record. |
void |
removeReservation(ReservationID rid)
Removes the corresponding reservation object. |
void |
removeReservation(ResourceReservation reservation)
|
void |
removeSlice(SliceID sliceID)
Removes the corresponding database slice record. |
void |
reset(java.util.Properties p)
De-serializes the object from the given properties list. |
void |
revisit(IActor actor,
java.util.Properties p)
Recovers state of the component using a previously saved properties list and a references to the actor this component belongs to. |
java.util.Properties |
save()
Serializes the object into a properties list. |
void |
save(java.util.Properties p)
Serializes the object into the given properties list. |
void |
setActorName(java.lang.String actorName)
Sets the name of the actor this database belongs to. |
void |
setLogger(LoggingTool logger)
Sets the logger object to be used by the database layer implementation. |
void |
setResetState(boolean value)
Indicates whether the database class should erase any previous database state. |
void |
unregisterReservationListener(IStateChangeListener listener)
Unregisters the state change listener |
void |
updateBroker(IBrokerProxy broker)
Updates the specified broker proxy record. |
void |
updateConfigurationMapping(java.lang.String key,
ConfigurationMapping map)
Updates the specified configuration mapping record. |
void |
updateReservation(ResourceReservation reservation)
Updates the corresponding reservation object. |
void |
updateSlice(Slice slice)
Updates the corresponding database slice record. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String actorName
protected java.util.Hashtable slices
protected java.util.Hashtable inventorySlices
protected LoggingTool logger
protected boolean resetState
| Constructor Detail |
|---|
public MemoryDatabase()
| Method Detail |
|---|
public void setLogger(LoggingTool logger)
IDatabase
setLogger in interface IDatabaselogger - logger objectpublic LoggingTool getLogger()
IDatabase
getLogger in interface IDatabase
public void initialize()
throws java.lang.Exception
IInitialize
initialize in interface IInitializejava.lang.Exception
public void actorAdded()
throws java.lang.Exception
IDatabase
actorAdded in interface IDatabasejava.lang.Exception
public void addSlice(Slice slice)
throws java.lang.Exception
IDatabase
addSlice in interface IDatabaseslice - Slice object
java.lang.Exception
public void updateSlice(Slice slice)
throws java.lang.Exception
IDatabase
updateSlice in interface IDatabaseslice - slice object
java.lang.Exception
public java.util.Vector getSlice(SliceID sliceID)
throws java.lang.Exception
IDatabase
getSlice in interface IDatabasesliceID - slice name
java.lang.Exception
public java.util.Vector getSlices()
throws java.lang.Exception
IDatabase
getSlices in interface IDatabasejava.lang.Exception
public java.util.Vector getInventorySlices()
throws java.lang.Exception
IDatabase
getInventorySlices in interface IDatabasejava.lang.Exception
public void removeSlice(SliceID sliceID)
throws java.lang.Exception
IDatabase
removeSlice in interface IDatabasesliceID - slice name
java.lang.Exceptionprotected MemoryDatabase.SliceData getSliceData(Slice slice)
protected MemoryDatabase.SliceData getSliceData(java.lang.String sliceName)
public void addReservation(ResourceReservation reservation)
throws java.lang.Exception
IDatabase
addReservation in interface IDatabasejava.lang.Exception
public java.util.Vector getReservation(java.lang.String sliceName,
ReservationID rid)
throws java.lang.Exception
java.lang.Exception
public java.util.Vector getReservation(ReservationID rid)
throws java.lang.Exception
IDatabase
getReservation in interface IDatabaserid - Reservation identifier
java.lang.Exception
public void updateReservation(ResourceReservation reservation)
throws java.lang.Exception
IDatabase
updateReservation in interface IDatabasejava.lang.Exception
public void removeReservation(ResourceReservation reservation)
throws java.lang.Exception
java.lang.Exception
public void removeReservation(ReservationID rid)
throws java.lang.Exception
IDatabase
removeReservation in interface IDatabasejava.lang.Exception
public java.util.Vector getReservations(Slice slice)
throws java.lang.Exception
java.lang.Exception
public void addBroker(IBrokerProxy broker)
throws java.lang.Exception
IDatabase
addBroker in interface IDatabasejava.lang.Exception
public void removeBroker(IBrokerProxy broker)
throws java.lang.Exception
IDatabase
removeBroker in interface IDatabasejava.lang.Exception
public void updateBroker(IBrokerProxy broker)
throws java.lang.Exception
IDatabase
updateBroker in interface IDatabasejava.lang.Exception
public java.util.Vector getBrokers()
throws java.lang.Exception
IDatabase
getBrokers in interface IDatabasejava.lang.Exception
public java.util.Properties save()
throws java.lang.Exception
ISerialize
save in interface ISerializejava.lang.Exception
public void save(java.util.Properties p)
throws java.lang.Exception
ISerialize
save in interface ISerializep - properties list to serialize the object into
java.lang.Exception
public void reset(java.util.Properties p)
throws java.lang.Exception
ISerialize
reset in interface ISerializep - properties list containing the serialized version of
the object
java.lang.Exception
public void revisit(IActor actor,
java.util.Properties p)
throws java.lang.Exception
IRecover
revisit in interface IRecoveractor - actor object the component belongs top - properties list containing configuration data about the
component
java.lang.Exception
public java.util.Vector getClientSlices()
throws java.lang.Exception
IDatabase
getClientSlices in interface IDatabasejava.lang.Exception
public java.util.Vector getReservations(SliceID sliceID)
throws java.lang.Exception
IDatabase
getReservations in interface IDatabasejava.lang.Exception
public void addConfigurationMapping(java.lang.String key,
ConfigurationMapping map)
throws java.lang.Exception
IDatabase
addConfigurationMapping in interface IDatabasekey - key for the recordmap - mapping object
java.lang.Exception
public void updateConfigurationMapping(java.lang.String key,
ConfigurationMapping map)
throws java.lang.Exception
IDatabase
updateConfigurationMapping in interface IDatabasekey - record keymap - mapping object
java.lang.Exception
public java.util.Vector getConfigurationMappings()
throws java.lang.Exception
IDatabase
getConfigurationMappings in interface IDatabasejava.lang.Exception
public java.util.Vector getConfigurationMapping(java.lang.String key)
throws java.lang.Exception
IDatabase
getConfigurationMapping in interface IDatabasekey - record key
java.lang.Exception
public void removeConfigurationMapping(java.lang.String key)
throws java.lang.Exception
IDatabase
removeConfigurationMapping in interface IDatabasekey - key
java.lang.Exceptionpublic void setActorName(java.lang.String actorName)
IDatabase
setActorName in interface IDatabaseactorName - actor name
public java.util.Vector getClientReservations()
throws java.lang.Exception
IDatabase
getClientReservations in interface IDatabasejava.lang.Exception
public java.util.Vector getHoldings()
throws java.lang.Exception
IDatabase
getHoldings in interface IDatabasejava.lang.Exception
public java.util.Vector getReservations()
throws java.lang.Exception
IDatabase
getReservations in interface IDatabasejava.lang.Exception
public java.util.Vector getAgentReservations()
throws java.lang.Exception
IDatabase
getAgentReservations in interface IDatabasejava.lang.Exception
public java.util.Vector getAuthorityReservations()
throws java.lang.Exception
IDatabase
getAuthorityReservations in interface IDatabasejava.lang.Exceptionpublic void setResetState(boolean value)
IDatabase
setResetState in interface IDatabasepublic void registerReservationListener(IStateChangeListener listener)
registerReservationListener in interface IDatabaselistener - public void unregisterReservationListener(IStateChangeListener listener)
unregisterReservationListener in interface IDatabaselistener -
public java.util.Vector<java.util.Properties> getSlice(ResourceType type)
throws java.lang.Exception
IDatabase
getSlice in interface IDatabasetype - resource type associated with the slice
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||