|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.client.DatasetServiceReplicator
public class DatasetServiceReplicator
The underlying graph implementation for local models. Caches tracked statements (and other data) locally to avoid server transactions for every graph operation.
| Constructor Summary | |
|---|---|
DatasetServiceReplicator(DatasetService datasetService,
java.util.Properties properties,
java.util.concurrent.locks.ReentrantReadWriteLock datasetLock)
Create a new DatasetServiceReplicator |
|
| Method Summary | |
|---|---|
boolean |
addTracker(org.openrdf.model.URI trackerSetURI,
ISerializableTracker tracker)
Start tracking a (possibly overlapping) set of statements. |
boolean |
addTrackerListener(org.openrdf.model.URI trackerSetURI,
ISerializableTracker tracker,
TrackerListener trackerListener)
Adds a TrackerListener which will get events of changes to the graph that match the supplied tracker. |
void |
close()
Close the replicator, stoping all timers, and clearing the tracker cache |
boolean |
containsTracker(org.openrdf.model.URI trackerSetURI,
ISerializableTracker tracker)
Return true if there is a tracker register and in the named trackerSet |
java.util.Collection<ISerializableTracker> |
getAllTrackers()
Get all the registered trackers |
INotificationListener |
getNotificationListener()
Get the notificationListener |
long |
getReplicationInterval()
Get the replication interval |
int |
getReplicationMode()
Get the current replication mode |
java.util.Set<ISerializableTracker> |
getTrackers(org.openrdf.model.URI trackerSetURI)
Get a new collection containing all trackers for the given tracker set. |
void |
registerReplicationListener(IReplicationListener listener)
Register an IReplicationListener listener |
void |
removeAllTrackers(org.openrdf.model.URI trackerSetURI)
Remove all trackers that makeup the named tracker set |
boolean |
removeTracker(org.openrdf.model.URI trackerSetURI,
ISerializableTracker tracker)
Stop tracking a set of statements. |
boolean |
removeTrackerListener(java.lang.String trackerSetUri,
ISerializableTracker tracker,
TrackerListener trackerListener)
Removes a TrackerListener so that is no longer gets events of changes to the graph that match the supplied tracker. |
void |
replicate(boolean synchronous)
Replicate local and remote changes |
void |
setReplicationInterval(long interval)
Set the interval of replications when in Automatic replication mode |
void |
setReplicationMode(int mode)
Set the replication mode |
void |
unregisterReplicationListener(IReplicationListener listener)
Unregister an IReplicationListener listener |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatasetServiceReplicator(DatasetService datasetService,
java.util.Properties properties,
java.util.concurrent.locks.ReentrantReadWriteLock datasetLock)
datasetService - Parent datasetServiceproperties - Configuration propertiesdatasetLock - Shared datasetService lock| Method Detail |
|---|
public boolean addTracker(org.openrdf.model.URI trackerSetURI,
ISerializableTracker tracker)
throws ReplicationException
trackerSetURI - tracker -
ReplicationException
public boolean removeTracker(org.openrdf.model.URI trackerSetURI,
ISerializableTracker tracker)
throws ReplicationException
trackerSetURI - tracker -
ReplicationException
public boolean addTrackerListener(org.openrdf.model.URI trackerSetURI,
ISerializableTracker tracker,
TrackerListener trackerListener)
throws AnzoException
trackerSetURI - tracker - trackerListener - must not be null
AnzoExceptionaddTracker(URI, ISerializableTracker)
public boolean removeTrackerListener(java.lang.String trackerSetUri,
ISerializableTracker tracker,
TrackerListener trackerListener)
throws AnzoException
trackerSetUri - URI of trackerset that this listener belongstracker - Tracker to which listener is to be removedtrackerListener - Listener to remove
AnzoException - if the tracker was not registeredremoveTracker(URI, ISerializableTracker)
public boolean containsTracker(org.openrdf.model.URI trackerSetURI,
ISerializableTracker tracker)
trackerSetURI - URI of trackerSettracker - to check
public void removeAllTrackers(org.openrdf.model.URI trackerSetURI)
throws ReplicationException
trackerSetURI - URI of trackerSet
ReplicationExceptionpublic java.util.Collection<ISerializableTracker> getAllTrackers()
public java.util.Set<ISerializableTracker> getTrackers(org.openrdf.model.URI trackerSetURI)
trackerSetURI - URI of trackerSet
public void close()
public void replicate(boolean synchronous)
throws AnzoException
synchronous - true to replicate in a blocking synchronous manor, asynchronous otherwise
AnzoException
public void setReplicationInterval(long interval)
throws ReplicationException
interval - of replications
ReplicationExceptionpublic long getReplicationInterval()
public void setReplicationMode(int mode)
throws ReplicationException
mode - replication mode to set
ReplicationExceptionIReplicationService.REPLICATION_AUTOMATIC,
IReplicationService.REPLICATION_IMMEDIATE_SYNC,
IReplicationService.REPLICATION_IMMEDIATE_ASYNC,
IReplicationService.REPLICATION_MANUALpublic int getReplicationMode()
IReplicationService.REPLICATION_AUTOMATIC,
IReplicationService.REPLICATION_IMMEDIATE_SYNC,
IReplicationService.REPLICATION_IMMEDIATE_ASYNC,
IReplicationService.REPLICATION_MANUALpublic void registerReplicationListener(IReplicationListener listener)
listener - to registerpublic void unregisterReplicationListener(IReplicationListener listener)
listener - to unregisterpublic INotificationListener getNotificationListener()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||