|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.graph.request.Request
public abstract class Request
The abstract base class for all classes representing requests to be executed against a RepositoryConnection
.
Constructor Summary | |
---|---|
protected |
Request()
|
Method Summary | |
---|---|
void |
cancel()
Cancel this request. |
protected void |
checkNotFrozen()
Utility method to check that the request is not frozen, and if it is to throw an IllegalStateException . |
boolean |
freeze()
Freeze this request to prevent any further modification. |
Throwable |
getError()
Get the error associated with this request, if there is such an error. |
abstract RequestType |
getType()
Returns the type of the request |
boolean |
hasError()
Return whether there is an error associated with this request |
boolean |
isCancelled()
Check whether this request has been cancelled. |
boolean |
isFrozen()
Determine whether this request has been frozen, preventing any further updates. |
abstract boolean |
isReadOnly()
Return whether this request only reads information. |
protected String |
printable(Location location)
|
protected String |
printable(Location location,
Name child)
|
void |
setError(Throwable error)
Set the error for this request. |
void |
setLatchForFreezing(CountDownLatch latch)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Request()
Method Detail |
---|
public void setLatchForFreezing(CountDownLatch latch)
public void setError(Throwable error)
error
- the error to be associated with this request, or null if this request is to have no error
IllegalStateException
- if the request is frozenpublic boolean hasError()
public Throwable getError()
public boolean isCancelled()
true
.
For example, if processing is almost complete, it may be appropriate to simply finish processing the request.
This method is safe to be called by different threads.
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.
IllegalStateException
- if the request is frozenpublic abstract boolean isReadOnly()
public boolean isFrozen()
public boolean freeze()
protected void checkNotFrozen() throws IllegalStateException
IllegalStateException
.
IllegalStateException
- if the request is frozenpublic abstract RequestType getType()
protected String printable(Location location)
protected String printable(Location location, Name child)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |