| java.lang.Object com.sun.midp.jump.push.executive.persistence.StoreOperationManager
All known Subclasses: com.sun.midp.jump.push.executive.PushContentStore, com.sun.jump.module.contentstore.InMemoryContentStore,
StoreOperationManager | final public class StoreOperationManager (Code) | | Abstracts transaction-like operations on the content
store which need store handle.
|
Inner Class :public interface Operation | |
Inner Class :public interface ContentStore | |
Constructor Summary | |
public | StoreOperationManager(ContentStore contentStore) Constructs an instance of manager. |
StoreOperationManager | public StoreOperationManager(ContentStore contentStore)(Code) | | Constructs an instance of manager.
Parameters: contentStore - content store to use |
doOperation | public Object doOperation(boolean accessExclusive, Operation operation) throws IOException(Code) | | Performs an operation on the content store keeping an exclsuive lock.
Whatever outcome of the operation is, the exclusive lock is released.
Parameters: operation - operation to perform Parameters: accessExclusive - controls exclusiveness of access abstract result of the operation throws: IOException - if IO fails |
getNode | public JUMPNode getNode(String uri) throws IOException(Code) | | Gets a node.
This method is just a wrapper around the corresponding content store API.
Parameters: uri - URI of the node to get reference to a node throws: IOException - if IO fails |
safelyDeleteDataNode | public void safelyDeleteDataNode(String uri) throws IOException(Code) | | Safely deletes a data node.
Safely deletion means that node is deleted if it is present.
The exclusive lock is obtained and held while operation is running and
thus the content store should be in unlocked state.
Parameters: uri - URI of the node to delete throws: IOException - if IO fails |
safelyUpdateDataNode | public void safelyUpdateDataNode(String uri, JUMPData data) throws IOException(Code) | | Safely updates a data node.
Safely update means that node is either updated (if it exists already)
or created afresh.
The exclusive lock is obtained and held while operation is running and
thus the content store should be in unlocked state.
Parameters: uri - URI of the node to get Parameters: data - data to put throws: IOException - if IO fails |
|
|