|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.graph.io.GraphBatchDestination
@NotThreadSafe public class GraphBatchDestination

A Destination that makes the changes to a graph via a Graph.Batch.
| Field Summary | |
|---|---|
protected Graph.Batch |
batch
|
protected boolean |
ignoreSubmit
|
| Constructor Summary | |
|---|---|
GraphBatchDestination(Graph.Batch batch)
Create a new instance that will use the specified batch. |
|
GraphBatchDestination(Graph.Batch batch,
boolean ignoreSubmit)
Create a new instance that will use the specified batch. |
|
| Method Summary | |
|---|---|
void |
create(NodeConflictBehavior behavior,
Path path,
Property firstProperty,
Property... additionalProperties)
Create a node at the supplied path and with the supplied attributes, using the supplied behavior in case of a node conflict. |
void |
create(Path path,
Iterable<Property> properties)
Create a node at the supplied path and with the supplied attributes. |
void |
create(Path path,
Property firstProperty,
Property... additionalProperties)
Create a node at the supplied path and with the supplied attributes. |
protected NodeConflictBehavior |
createBehaviorFor(Path path)
Override this method in a subclass to control the NodeConflictBehavior that should be used when creating the node
at the supplied path. |
ExecutionContext |
getExecutionContext()
Obtain the execution context of the destination. |
boolean |
isSubmitIgnored()
Return whether this instance is ignoring calls to submit(). |
void |
setProperties(Path path,
Iterable<Property> properties)
Sets the given properties on the node at the supplied path. |
void |
setProperties(Path path,
Property... properties)
Sets the given properties on the node at the supplied path. |
void |
submit()
Signal to this destination that any enqueued create requests should be submitted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final Graph.Batch batch
protected final boolean ignoreSubmit
| Constructor Detail |
|---|
public GraphBatchDestination(Graph.Batch batch)
submit() is called, the batch will be
executed.
batch - the batch
IllegalArgumentException - if the batch is null
public GraphBatchDestination(Graph.Batch batch,
boolean ignoreSubmit)
ignoreSubmit is true, then submit() does
nothing (and the batch must be executed}; otherwise, submit() immediately calls the executed.
batch - the batchignoreSubmit - true if the submit() method should be ignored, or false otherwise
IllegalArgumentException - if the batch is null| Method Detail |
|---|
public boolean isSubmitIgnored()
submit().
public ExecutionContext getExecutionContext()
getExecutionContext in interface DestinationDestination.getExecutionContext()
public void create(Path path,
Iterable<Property> properties)
create in interface Destinationpath - the absolute path of the nodeproperties - the properties for the node; never null, but may be empty if there are no propertiesDestination.create(org.modeshape.graph.property.Path, Iterable)
public void create(Path path,
Property firstProperty,
Property... additionalProperties)
create in interface Destinationpath - the absolute path of the nodefirstProperty - the first propertyadditionalProperties - the remaining properties for the nodeDestination.create(org.modeshape.graph.property.Path, org.modeshape.graph.property.Property,
org.modeshape.graph.property.Property[])
public void create(NodeConflictBehavior behavior,
Path path,
Property firstProperty,
Property... additionalProperties)
create in interface Destinationbehavior - the node conflict behaviorpath - the absolute path of the nodefirstProperty - the first propertyadditionalProperties - the remaining properties for the nodeDestination.create(org.modeshape.graph.NodeConflictBehavior, org.modeshape.graph.property.Path,
org.modeshape.graph.property.Property, org.modeshape.graph.property.Property[])
public void setProperties(Path path,
Property... properties)
setProperties in interface Destinationpath - the absolute path of the nodeproperties - the remaining properties for the nodeDestination.setProperties(org.modeshape.graph.property.Path,
org.modeshape.graph.property.Property[])
public void setProperties(Path path,
Iterable<Property> properties)
setProperties in interface Destinationpath - the absolute path of the nodeproperties - the remaining properties for the nodeDestination.setProperties(org.modeshape.graph.property.Path, java.lang.Iterable)public void submit()
submit in interface DestinationDestination.submit()protected NodeConflictBehavior createBehaviorFor(Path path)
NodeConflictBehavior that should be used when creating the node
at the supplied path. By default, this method returns null.
path - the path of the new node
NodeConflictBehavior.UPDATE should be used
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||