|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.graph.request.Request
org.modeshape.graph.request.ChangeRequest
org.modeshape.graph.request.LockBranchRequest
public class LockBranchRequest

Instruction to lock an existing node or branch. Connectors that do not support locking must ignore this request.
| Nested Class Summary | |
|---|---|
static class |
LockBranchRequest.LockScope
|
| Constructor Summary | |
|---|---|
LockBranchRequest(Location at,
String workspaceName,
LockBranchRequest.LockScope isDeep,
long lockTimeoutInMillis)
Create a request to lock the node or branch at the supplied location. |
|
| Method Summary | |
|---|---|
Location |
at()
Get the location defining the node that is to be read. |
void |
cancel()
Cancel this request. |
Location |
changedLocation()
Get the location of the top-most node that is to be changed by this request. |
String |
changedWorkspace()
Get the name of the workspace that was changed by this request. |
boolean |
changes(String workspace,
Path path)
Determine if this request changes the branch at the given path. |
LockBranchRequest |
clone()
This method does not clone the results. |
boolean |
equals(Object obj)
|
Location |
getActualLocation()
Get the actual location of the node that was locked. |
int |
hashCode()
|
String |
inWorkspace()
Get the name of the workspace in which the node exists. |
boolean |
isReadOnly()
Return whether this request only reads information. |
LockBranchRequest.LockScope |
lockScope()
Get whether the lock should include all of the descendants of the node as well as the node itself |
long |
lockTimeoutInMillis()
Gets the maximum length of the lock in milliseconds |
void |
setActualLocation(Location actualLocation)
Sets the actual and complete location of the node being locked. |
String |
toString()
|
| Methods inherited from class org.modeshape.graph.request.Request |
|---|
checkNotFrozen, freeze, getError, hasError, isCancelled, isFrozen, setError, setLatchForFreezing |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LockBranchRequest(Location at,
String workspaceName,
LockBranchRequest.LockScope isDeep,
long lockTimeoutInMillis)
at - the location of the node to be readworkspaceName - the name of the workspace containing the nodeisDeep - whether the lock should be deep (i.e., should include all of the node's descendants)lockTimeoutInMillis - the number of milliseconds that the lock should last before the lock times out; zero (0)
indicates that the connector default should be used
IllegalArgumentException - if the location or workspace name is null| Method Detail |
|---|
public boolean isReadOnly()
isReadOnly in class RequestRequest.isReadOnly()public Location at()
public String inWorkspace()
public LockBranchRequest.LockScope lockScope()
LockBranchRequest.LockScope.SELF_AND_DESCENDANTS if the lock should include all of the descendants of the node,
LockBranchRequest.LockScope.SELF_ONLY otherwisepublic long lockTimeoutInMillis()
public void setActualLocation(Location actualLocation)
path.
actualLocation - the actual location of the node before being locked
IllegalArgumentException - if the either location is null or is missing its path, if the old location is not
equal to the current location
IllegalStateException - if the request is frozenpublic Location getActualLocation()
public boolean changes(String workspace,
Path path)
changes in class ChangeRequestworkspace - the name of the workspace; may not be nullpath - the path; may not be null
ChangeRequest.changes(java.lang.String, org.modeshape.graph.property.Path)public Location changedLocation()
path.
changedLocation in class ChangeRequestChangeRequest.changedLocation()public String changedWorkspace()
changedWorkspace in class ChangeRequestChangeRequest.changedWorkspace()public void cancel()
cancellation flag is set, and any current or
future processing of the request may be affected by the cancellation. (Note however, that processors may choose to not
respect this request.)
This method is safe to be called by different threads.
cancel in class RequestRequest.cancel()public int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String toString()
toString in class ObjectObject.toString()public LockBranchRequest clone()
This method does not clone the results.
This method does not clone the results.
clone in class ChangeRequestChangeRequest.clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||