|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.datamgr.DataManager
Provides an abstract implementation of a common interface for applications
needing to work with a data store. Implementers of DataListener
register with a DataManager
instance. An instance of data is
uniquely identified using an object identifier. Applications must request
locks to restrict writing of data.
Constructor Summary | |
---|---|
DataManager()
|
Method Summary | |
---|---|
abstract boolean |
delete(String oid)
Deletes an existing data object iff the object is not locked. |
abstract boolean |
delete(String oid,
String lockKey)
Deletes an existing data object, assuming the caller had requested and recieved the necessary lock. |
abstract List |
get(List oids)
Retrieves a List of data objects. |
abstract Object |
get(String oid)
Retrieves a single data object. |
abstract boolean |
isLocked(String oid)
Determine whether a given object is locked. |
abstract boolean |
isValidLock(String oid,
String lockKey)
Determine whether a given object is locked with the given key. |
abstract String |
lock(String oid)
Request a lock for a data object. |
abstract boolean |
oidExists(String oid)
Determines whether an object with the given oid exists in the DataManager. |
abstract Object |
put(String oid,
Object obj)
Adds a new object of data. |
abstract Object |
remove(String oid)
Removes an existing data object iff the object is not locked. |
abstract Object |
remove(String oid,
String lockKey)
Removes an existing data object, assuming the caller had requested and recieved the necessary lock. |
abstract boolean |
unlock(String oid,
String lockKey)
Remove the lock on a data object. |
abstract Object |
update(String oid,
Object obj)
Updates a new object of data iff the object is not locked. |
abstract Object |
update(String oid,
Object obj,
String lockKey)
Updates a new object of data, assuming the caller had requested and recieved the necessary lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DataManager()
Method Detail |
public abstract Object get(String oid) throws OIDDoesNotExistException
oid
- The data identifier
Object
of data
OIDDoesNotExistException
public abstract List get(List oids) throws OIDDoesNotExistException
List
of data objects.
oids
- List
of data identifiers
List
of corresponding data objects
OIDDoesNotExistException
public abstract Object put(String oid, Object obj) throws OIDAlreadyExistsException, ObjectNotSupportedException
oid
- The unique identifier that references the new data objectobj
- The new data object
OIDAlreadyExistsException
ObjectNotSupportedException
public abstract Object remove(String oid, String lockKey) throws OIDDoesNotExistException, InvalidLockException
oid
- The unique identifier that references the data object to be removedlockKey
- The key corresponding to the lock on this data object
OIDDoesNotExistException
InvalidLockException
public abstract Object remove(String oid) throws OIDDoesNotExistException, LockNotAvailableException
oid
- The unique identifier that references the data object to be removed
OIDDoesNotExistException
LockNotAvailableException
public abstract boolean delete(String oid, String lockKey) throws OIDDoesNotExistException, InvalidLockException
remove()
except no object is returned and thus is more efficient
if an object is not required.
oid
- The unique identifier that references the data object to be deletedlockKey
- The key corresponding to the lock on this data object
OIDDoesNotExistException
InvalidLockException
public abstract boolean delete(String oid) throws OIDDoesNotExistException, LockNotAvailableException
remove()
except no object is returned and thus is more efficient.
After successful completion the object is deleted from the DataManager.
oid
- The unique identifier that references the data object to be deleted
OIDDoesNotExistException
LockNotAvailableException
public abstract Object update(String oid, Object obj, String lockKey) throws OIDDoesNotExistException, ObjectNotSupportedException, InvalidLockException
oid
- The unique identifier that references the data object to be updatedobj
- The new updated data objectlockKey
- The key corresponding to the lock on this data object
OIDDoesNotExistException
ObjectNotSupportedException
InvalidLockException
public abstract Object update(String oid, Object obj) throws OIDDoesNotExistException, ObjectNotSupportedException, LockNotAvailableException
oid
- The unique identifier that references the data object to be updatedobj
- The new updated data object
OIDDoesNotExistException
ObjectNotSupportedException
LockNotAvailableException
public abstract String lock(String oid) throws OIDDoesNotExistException, LockNotAvailableException
oid
- The unique identifier that references the data object to be locked
OIDDoesNotExistException
LockNotAvailableException
public abstract boolean unlock(String oid, String lockKey) throws OIDDoesNotExistException, InvalidLockException
oid
- The unique identifier that references the locked data objectlockKey
- The key corresponding to the lock on this data object
OIDDoesNotExistException
InvalidLockException
public abstract boolean oidExists(String oid)
oid
- The unique identifier that references the data object
public abstract boolean isLocked(String oid)
oid
- The unique identifier that references the data object
public abstract boolean isValidLock(String oid, String lockKey)
oid
- The unique identifier that references the data objectlockKey
- The lock key
|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |