public class PeerHyperNode extends java.lang.Object implements HyperNode
This HyperNode
implementation lets you access a remote HyperGraph instance in
client-server way. All HyperNode
methods send the operations to the remote peer and
wait for the response in a synchronous way before returning.
The implementation uses the "common activities" provided by CACTBootstrap
. Therefore,
make sure you include that initialization class in the list of bootstrap classes invoked during
peer startup. For example, your peer configuration file should look like this:
{ ...,
"bootstrap" : [ {"class" : "org.hypergraphdb.peer.bootstrap.AffirmIdentityBootstrap", "config" : {}},
{"class" : "org.hypergraphdb.peer.bootstrap.CACTBootstrap", "config" : {}},
etc...
}
If you want to perform the operations asynchronously, you would have to trigger the activities
Constructor and Description |
---|
PeerHyperNode(HyperGraphPeer thisPeer,
HGPeerIdentity other) |
Modifier and Type | Method and Description |
---|---|
HGHandle |
add(java.lang.Object atom,
HGHandle type,
int flags) |
long |
count(HGQueryCondition condition) |
void |
define(HGHandle handle,
HGHandle type,
java.lang.Object instance,
int flags) |
<T> HGSearchResult<T> |
find(HGQueryCondition condition) |
java.util.List<HGHandle> |
findAll(HGQueryCondition condition) |
<T> T |
findOne(HGQueryCondition condition) |
<T> T |
get(HGHandle handle) |
<T> java.util.List<T> |
getAll(HGQueryCondition condition) |
IncidenceSet |
getIncidenceSet(HGHandle handle) |
<T> T |
getOne(HGQueryCondition condition) |
HGHandle |
getType(HGHandle handle) |
boolean |
remove(HGHandle handle) |
boolean |
replace(HGHandle handle,
java.lang.Object newValue,
HGHandle newType) |
public PeerHyperNode(HyperGraphPeer thisPeer, HGPeerIdentity other)
public IncidenceSet getIncidenceSet(HGHandle handle)
getIncidenceSet
in interface HyperNode
public <T> HGSearchResult<T> find(HGQueryCondition condition)
public <T> T findOne(HGQueryCondition condition)
public <T> T getOne(HGQueryCondition condition)
public <T> java.util.List<T> getAll(HGQueryCondition condition)
public java.util.List<HGHandle> findAll(HGQueryCondition condition)
public long count(HGQueryCondition condition)