public class GraphDispatcher extends GraphMutationCollector implements org.plasma.sdo.access.DataGraphDispatcher
data graph including
any number of creates (inserts), modifications (updates) and deletes across
one or more HBase table rows.
For new (created) data graphs, a row key
{org.cloudgraph.hbase.key.HBaseRowKeyFactory factory} is used to create a new
composite HBase row key. The row key generation is driven by a configured
CloudGraph row key model for
a specific HTable configuration. A
minimal set of state
information is persisted with each new data graph.
For data graphs with any other combination of changes, e.g. data object modifications, deletes, etc... an existing HBase row key is fetched using an HBase Get operation.
DistributedWriter,
GraphRowKeyFactory,
GraphColumnKeyFactory,
SequenceGenerator| Modifier and Type | Field and Description |
|---|---|
protected ServiceContext |
context |
protected org.plasma.sdo.core.SnapshotMap |
snapshotMap |
protected String |
username |
create, delete, update| Constructor and Description |
|---|
GraphDispatcher(ServiceContext context,
org.plasma.sdo.core.SnapshotMap snapshotMap,
String username) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.plasma.sdo.core.SnapshotMap |
commit(commonj.sdo.DataGraph dataGraph)
Propagates changes to the given data graph including any number of creates (inserts),
modifications (updates) and deletes to a single or multiple HBase tables
and table rows.
|
org.plasma.sdo.core.SnapshotMap |
commit(commonj.sdo.DataGraph[] dataGraphs)
Propagates changes to the given array of data graphs including any number of creates (inserts),
modifications (updates) and deletes to a single or multiple HBase tables
and table rows.
|
protected List<org.plasma.sdo.PlasmaEdge> |
findOwnedEdges(org.plasma.sdo.PlasmaNode dataNode,
commonj.sdo.Property property,
List<org.plasma.sdo.PlasmaEdge> edges,
DistributedWriter graphWriter,
RowWriter rowWriter)
Deprecated.
|
protected HashMap<String,commonj.sdo.DataObject> |
getOldEdgeMap(Object oldValue,
commonj.sdo.Property property) |
protected void |
setupOptimistic(commonj.sdo.DataGraph dataGraph,
org.plasma.sdo.PlasmaDataObject dataObject,
org.plasma.sdo.PlasmaType type,
long sequence,
RowWriter rowWriter) |
protected void |
setupOrigination(commonj.sdo.DataGraph dataGraph,
org.plasma.sdo.PlasmaDataObject dataObject,
org.plasma.sdo.PlasmaType type,
long sequence,
RowWriter rowWriter) |
protected String |
toString(Map<String,commonj.sdo.DataObject> map) |
protected void |
validateModifications(commonj.sdo.DataGraph dataGraph,
org.plasma.sdo.PlasmaDataObject dataObject,
RowWriter rowWriter) |
collectChanges, collectChangesprotected org.plasma.sdo.core.SnapshotMap snapshotMap
protected String username
protected ServiceContext context
public GraphDispatcher(ServiceContext context, org.plasma.sdo.core.SnapshotMap snapshotMap, String username)
public void close()
close in interface MutationCollectorclose in interface org.plasma.sdo.access.DataGraphDispatcherclose in class GraphMutationCollectorpublic org.plasma.sdo.core.SnapshotMap commit(commonj.sdo.DataGraph dataGraph)
commit in interface org.plasma.sdo.access.DataGraphDispatcherDuplicateRowException - if for a new data graph, the generated row key already exists in
the HBase table configured .public org.plasma.sdo.core.SnapshotMap commit(commonj.sdo.DataGraph[] dataGraphs)
commit in interface org.plasma.sdo.access.DataGraphDispatcherDuplicateRowException - if for a new data graph, the generated row key already exists in
the HBase table configured .protected HashMap<String,commonj.sdo.DataObject> getOldEdgeMap(Object oldValue, commonj.sdo.Property property)
@Deprecated protected List<org.plasma.sdo.PlasmaEdge> findOwnedEdges(org.plasma.sdo.PlasmaNode dataNode, commonj.sdo.Property property, List<org.plasma.sdo.PlasmaEdge> edges, DistributedWriter graphWriter, RowWriter rowWriter) throws IOException
IOExceptionprotected void setupOptimistic(commonj.sdo.DataGraph dataGraph,
org.plasma.sdo.PlasmaDataObject dataObject,
org.plasma.sdo.PlasmaType type,
long sequence,
RowWriter rowWriter)
throws IOException
IOExceptionprotected void setupOrigination(commonj.sdo.DataGraph dataGraph,
org.plasma.sdo.PlasmaDataObject dataObject,
org.plasma.sdo.PlasmaType type,
long sequence,
RowWriter rowWriter)
throws IOException
IOExceptionprotected void validateModifications(commonj.sdo.DataGraph dataGraph,
org.plasma.sdo.PlasmaDataObject dataObject,
RowWriter rowWriter)
throws IllegalAccessException
IllegalAccessExceptionCopyright © 2021. All Rights Reserved.