org.jboss.cache.optimistic
Interface TransactionWorkspace

All Known Implementing Classes:
TransactionWorkspaceImpl

public interface TransactionWorkspace

Used to contain a copy of the tree being worked on within the scope of a given transaction. Maintains WorkspaceNodes rather than conventional DataNodes. Also see OptimisticTransactionEntry, which creates and maintains an instance of TransactionWorkspace for each transaction running.

Author:
Manik Surtani (manik@jboss.org), Steve Woodcock (stevew@jofti.com)

Method Summary
 void addNode(WorkspaceNode node)
          Is thread safe so you dont need to deal with synchronising access to this method.
 WorkspaceNode getNode(Fqn fqn)
           
 java.util.Map getNodes()
           
 java.util.SortedMap getNodesAfter(Fqn fqn)
          Returns all nodes equal to or after the given node.
 boolean isVersioningImplicit()
          Tests if versioning is implicit for a given tx.
 java.lang.Object removeNode(Fqn fqn)
          Is thread safe so you dont need to deal with synchronising access to this method.
 void setNodes(java.util.Map nodes)
           
 void setVersioningImplicit(boolean versioningImplicit)
          Sets if versioning is implicit for a given tx.
 

Method Detail

getNodes

java.util.Map getNodes()
Returns:
Returns a map of WorkspaceNodes, keyed on Fqn

setNodes

void setNodes(java.util.Map nodes)
Parameters:
nodes - The nodes to set. Takes WorkspaceNodes.

getNode

WorkspaceNode getNode(Fqn fqn)

addNode

void addNode(WorkspaceNode node)
Is thread safe so you dont need to deal with synchronising access to this method.

Parameters:
node -

removeNode

java.lang.Object removeNode(Fqn fqn)
Is thread safe so you dont need to deal with synchronising access to this method.


getNodesAfter

java.util.SortedMap getNodesAfter(Fqn fqn)
Returns all nodes equal to or after the given node.


isVersioningImplicit

boolean isVersioningImplicit()
Tests if versioning is implicit for a given tx. If set to true, the interceptor chain will handle versioning (implicit to JBossCache). If set to false, DataVersions will have to come from the caller.


setVersioningImplicit

void setVersioningImplicit(boolean versioningImplicit)
Sets if versioning is implicit for a given tx. If set to true, the interceptor chain will handle versioning (implicit to JBossCache). If set to false, DataVersions will have to come from the caller.



Copyright 1998-2005 JBoss Inc . All Rights Reserved.