|
||||||||||
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.CacheableRequest
org.modeshape.graph.request.ReadNextBlockOfChildrenRequest
public class ReadNextBlockOfChildrenRequest
Instruction to read a block of the children of a node, where the block is dictated by the location of the
child preceding the block
and the maximum number of children
to include in the block. This command is useful
when paging through a large number of children, when the previous block of children was already retrieved and the next block is
to be read.
ReadBlockOfChildrenRequest
,
Serialized FormField Summary | |
---|---|
static int |
INDEX_NOT_USED
|
Constructor Summary | |
---|---|
ReadNextBlockOfChildrenRequest(Location startingAfter,
String workspaceName,
int count)
Create a request to read those children of a node that are immediately after a supplied sibling node. |
Method Summary | |
---|---|
void |
addChild(Location child)
Add to the list of children that has been read the child with the given path and identification properties. |
void |
addChild(Path pathToChild,
Property idProperty)
Add to the list of children that has been read the child with the given path and identification property. |
void |
addChild(Path pathToChild,
Property firstIdProperty,
Property... remainingIdProperties)
Add to the list of children that has been read the child with the given path and identification properties. |
void |
addChildren(Iterable<Location> children)
Add to the list of children that has been read the supplied children with the given path and identification properties. |
void |
cancel()
Cancel this request. |
int |
count()
Get the maximum number of children that may be returned in the block. |
boolean |
equals(Object obj)
|
Location |
getActualLocationOfStartingAfterNode()
Get the actual location of the starting after sibling. |
List<Location> |
getChildren()
Get the children that were read from the RepositoryConnection after the request was processed. |
RequestType |
getType()
Returns the type of the request |
int |
hashCode()
|
String |
inWorkspace()
Get the name of the workspace in which the parent and children exist. |
boolean |
isReadOnly()
Return whether this request only reads information. |
void |
setActualLocationOfStartingAfterNode(Location actual)
Sets the actual and complete location of the node whose children have been read. |
Location |
startingAfter()
Get the location of the child after which the block begins. |
String |
toString()
|
Methods inherited from class org.modeshape.graph.request.CacheableRequest |
---|
getCachePolicy, getTimeLoaded, setCachePolicy, setTimeLoaded |
Methods inherited from class org.modeshape.graph.request.Request |
---|
checkNotFrozen, freeze, getError, hasError, isCancelled, isFrozen, printable, printable, setError, setLatchForFreezing |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int INDEX_NOT_USED
Constructor Detail |
---|
public ReadNextBlockOfChildrenRequest(Location startingAfter, String workspaceName, int count)
startingAfter
- the location of the previous sibling that was the last child of the previous block of children readworkspaceName
- the name of the workspace containing the nodecount
- the maximum number of children that should be included in the block
IllegalArgumentException
- if the workspace name or startingAfter
location is null, or if
count is less than 1.
Method Detail |
---|
public boolean isReadOnly()
isReadOnly
in class Request
Request.isReadOnly()
public int count()
startingAfter()
public Location startingAfter()
count()
public String inWorkspace()
public List<Location> getChildren()
RepositoryConnection
after the request was processed. Each child is
represented by a location.
public void addChildren(Iterable<Location> children)
children
- the locations of the children that were read
IllegalArgumentException
- if the parameter is null
IllegalStateException
- if the request is frozenaddChild(Location)
,
addChild(Path, Property)
,
addChild(Path, Property, Property...)
public void addChild(Location child)
child
- the location of the child that was read
IllegalArgumentException
- if the location is null
IllegalStateException
- if the request is frozenaddChild(Path, Property)
,
addChild(Path, Property, Property...)
public void addChild(Path pathToChild, Property firstIdProperty, Property... remainingIdProperties)
pathToChild
- the path of the child that was just readfirstIdProperty
- the first identification property of the child that was just readremainingIdProperties
- the remaining identification properties of the child that was just read
IllegalArgumentException
- if the path or identification properties are null
IllegalStateException
- if the request is frozenaddChild(Location)
,
addChild(Path, Property)
public void addChild(Path pathToChild, Property idProperty)
pathToChild
- the path of the child that was just readidProperty
- the identification property of the child that was just read
IllegalArgumentException
- if the path or identification properties are null
IllegalStateException
- if the request is frozenaddChild(Location)
,
addChild(Path, Property, Property...)
public void setActualLocationOfStartingAfterNode(Location actual)
path
.
actual
- the actual location of the node being read, or null if the starting after location
should be used
IllegalArgumentException
- if the actual location is null or does not have a path.
IllegalStateException
- if the request is frozenpublic Location getActualLocationOfStartingAfterNode()
starting after
sibling.
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 Request
Request.cancel()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
public RequestType getType()
Request
getType
in class Request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |