public abstract class RemotePeer
extends java.lang.Object
Constructor and Description |
---|
RemotePeer() |
RemotePeer(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
abstract HGHandle |
add(java.lang.Object atom)
Adds the atom on the remote peer.
|
protected void |
addToBatch(java.lang.Object operation) |
abstract void |
copyFrom(HGPersistentHandle handle)
Copies the atom with a given handle from the remote peer to the local
peer.
|
abstract void |
copyTo(HGHandle handle)
Copies the atom from a given handle from the local peer to the remote
peer.
|
abstract void |
define(HGPersistentHandle handle,
java.lang.Object atom)
Similar to add but with a given handle
|
protected abstract java.util.List<?> |
doFlush() |
java.util.List<?> |
endBatch()
After this call, the operations will be imediatelly sent to the remote
peer.
|
java.util.List<?> |
flushBatch()
Sends the current list of queued operations to the remote peer.
|
abstract java.lang.Object |
get(HGHandle handle) |
protected java.util.List<java.lang.Object> |
getBatch() |
HyperGraphPeer |
getLocalPeer() |
java.lang.String |
getName() |
boolean |
insideBatch() |
abstract java.util.ArrayList<?> |
query(HGQueryCondition condition,
boolean getObjects)
Executes a query on the remote peer
|
abstract HGHandle |
remove(HGPersistentHandle handle)
Removes the handle from the remote peer.
|
abstract void |
replace(HGPersistentHandle handle,
java.lang.Object atom)
Replaces the atom with the given handle on the remote peer.
|
void |
setLocalPeer(HyperGraphPeer localPeer) |
void |
setName(java.lang.String name) |
void |
startBatch()
Starts a batch.
|
java.lang.String |
toString() |
public RemotePeer()
public RemotePeer(java.lang.String name)
public abstract java.util.ArrayList<?> query(HGQueryCondition condition, boolean getObjects)
condition
- a HGQueryCondition to be executed on the remote peer.getObjects
- if true the actual objects are returned, otherwise the client
will just get a set of handles.public abstract java.lang.Object get(HGHandle handle)
handle
- The handle of the atom to be retrievedpublic abstract HGHandle add(java.lang.Object atom)
atom
- The atom to be addedpublic abstract void define(HGPersistentHandle handle, java.lang.Object atom)
handle
- atom
- public abstract void copyTo(HGHandle handle)
handle
- public abstract void copyFrom(HGPersistentHandle handle)
handle
- public abstract HGHandle remove(HGPersistentHandle handle)
handle
- the handle to remove from the remote peer.public abstract void replace(HGPersistentHandle handle, java.lang.Object atom)
handle
- the handle of the atom to be replacedatom
- the new atompublic void startBatch()
public java.util.List<?> endBatch()
public java.util.List<?> flushBatch()
protected abstract java.util.List<?> doFlush()
public boolean insideBatch()
protected void addToBatch(java.lang.Object operation)
protected java.util.List<java.lang.Object> getBatch()
public java.lang.String getName()
public void setName(java.lang.String name)
public HyperGraphPeer getLocalPeer()
public void setLocalPeer(HyperGraphPeer localPeer)
public java.lang.String toString()
toString
in class java.lang.Object