|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.keridwen.core.data.storage.service.impl.DefaultDataStorageService
public class DefaultDataStorageService
| Constructor Summary | |
|---|---|
DefaultDataStorageService()
|
|
| Method Summary | ||
|---|---|---|
boolean |
addDataPacketListener(DataPacketId packetId,
DataPacketListener listener)
Adds a listener on a data packet with given Id. |
|
boolean |
addDataStorageListener(DataStorageListener listener)
Adds a listener on this data storage. |
|
Set<DataPacketId> |
getDataListSafe(Class<?> objectClass)
Gets the list of ids for the objects of the given type. |
|
Set<DataPacketId> |
getDataListUnsafe(Class<?> objectClass)
Gets the list of ids for the objects of the given type. |
|
|
getDataSafe(DataPacketId packetId)
Gets the data object corresponding to the given unique id. |
|
|
getDataSafe(String objectName)
Gets the data object corresponding to the given name. |
|
|
getDataUnsafe(DataPacketId packetId)
Gets the data object corresponding to the given unique id. |
|
|
getDataUnsafe(String objectName)
Gets the data object corresponding to the given name. |
|
int |
getNbData()
Get the total number of stored data (safe+unsafe). |
|
String |
getPacketInformation(DataPacketId packetId)
Gets the information of the packet with the given id. |
|
Boolean |
isReadLocked(DataPacketId packetId)
Checks if the data packet with the given id is read locked. |
|
Boolean |
isWriteLocked(DataPacketId packetId)
Checks if the data packet with the given id is write locked. |
|
void |
onStartModule()
|
|
void |
onStopModule()
|
|
boolean |
removeDataPacketListener(DataPacketId packetId,
DataPacketListener listener)
Removes a listener from a data packet with given Id. |
|
boolean |
removeDataStorageListener(DataStorageListener listener)
Removes a listener from this data storage. |
|
boolean |
setDataSafe(Serializable serializableObject,
DataPacketId packetId)
Sets the object with the given unique id in the data storage. |
|
DataPacketId |
setDataSafe(String name,
Serializable serializableObject)
Sets the object with the given name in the data storage. |
|
|
setDataUnsafe(String name,
ObjectType object)
Sets the object with the given name in the data storage. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultDataStorageService()
| Method Detail |
|---|
public void onStartModule()
onStartModule in interface DataStorageServicepublic void onStopModule()
onStopModule in interface DataStorageServicepublic int getNbData()
DataStorage
getNbData in interface DataStorage
public <ObjectType> DataPacketId setDataUnsafe(String name,
ObjectType object)
throws DataIOException
DataStorage
setDataUnsafe in interface DataStorageObjectType - the type of the object to setname - the object nameobject - the object to set
DataIOException - if the data writting failed
public DataPacketId setDataSafe(String name,
Serializable serializableObject)
throws DataIOException,
DataConcurrencyException
DataStorage
setDataSafe in interface DataStoragename - the object nameserializableObject - the object to set
DataIOException - if the data writting failed
DataConcurrencyException - in case of concurrent access to the data
public boolean setDataSafe(Serializable serializableObject,
DataPacketId packetId)
throws DataIOException,
DataConcurrencyException
DataStorage
setDataSafe in interface DataStorageserializableObject - the object to setpacketId - the unique id of the object to set
DataIOException - if the data writting failed
DataConcurrencyException - in case of concurrent access to the data
public <ObjectType> ObjectType getDataUnsafe(DataPacketId packetId)
throws DataIOException
DataStorage
getDataUnsafe in interface DataStoragepacketId - the unique id of the object to retrieve
DataIOException - in case data reading failed
public <ObjectType extends Serializable> ObjectType getDataSafe(String objectName)
throws DataIOException,
DataConcurrencyException
DataStorage
getDataSafe in interface DataStorageobjectName - the name of the object to retrieve
DataIOException - in case data reading failed
DataConcurrencyException - in case of concurrent access to the data
public <ObjectType> ObjectType getDataUnsafe(String objectName)
throws DataIOException
DataStorage
getDataUnsafe in interface DataStorageobjectName - the name of the object to retrieve
DataIOException - in case data reading failed
public <ObjectType extends Serializable> ObjectType getDataSafe(DataPacketId packetId)
throws DataIOException,
DataConcurrencyException
DataStorage
getDataSafe in interface DataStoragepacketId - the unique id of the object to retrieve
DataIOException - in case data reading failed
DataConcurrencyException - in case of concurrent access to the datapublic Set<DataPacketId> getDataListSafe(Class<?> objectClass)
DataStorage
getDataListSafe in interface DataStorageobjectClass - the type of object to fetch
public Set<DataPacketId> getDataListUnsafe(Class<?> objectClass)
DataStorage
getDataListUnsafe in interface DataStorageobjectClass - the type of object to fetch
public boolean addDataPacketListener(DataPacketId packetId,
DataPacketListener listener)
DataStorage
addDataPacketListener in interface DataStoragepacketId - the id of the packet to listen
public boolean removeDataPacketListener(DataPacketId packetId,
DataPacketListener listener)
DataStorage
removeDataPacketListener in interface DataStoragepacketId - the id of the packet to stop listenningpublic String getPacketInformation(DataPacketId packetId)
DataStorage
getPacketInformation in interface DataStoragepacketId - the id of the packet
public Boolean isWriteLocked(DataPacketId packetId)
DataStorage
isWriteLocked in interface DataStoragepacketId - the id of the packet to check
public Boolean isReadLocked(DataPacketId packetId)
DataStorage
isReadLocked in interface DataStoragepacketId - the id of the packet to check
public boolean addDataStorageListener(DataStorageListener listener)
DataStorage
addDataStorageListener in interface DataStoragelistener - the listener to addpublic boolean removeDataStorageListener(DataStorageListener listener)
DataStorage
removeDataStorageListener in interface DataStoragelistener - the listener to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||