|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neo4j.remote.RemoteIndexService
public final class RemoteIndexService
An implementation of IndexService
for the client side of
RemoteGraphDatabase
. This requires that IndexService
s are registered on
the server using
BasicGraphDatabaseServer.registerIndexService(String, IndexService)
.
Constructor Summary | |
---|---|
RemoteIndexService(GraphDatabaseService neo,
String name)
Create a new client for an IndexService . |
Method Summary | |
---|---|
IndexHits<Node> |
getNodes(String key,
Object value)
Returns all nodes indexed with key and value . |
Node |
getSingleNode(String key,
Object value)
Returns a single node indexed with associated with key and
value . |
void |
index(Node node,
String key,
Object value)
Index node with key and value . |
void |
removeIndex(Node node,
String key,
Object value)
Dissociates a key-value pair from node . |
void |
setIsolation(Isolation level)
This operation is not supported by the RemoteIndexService . |
void |
shutdown()
Stops this indexing service committing any asynchronous requests that are currently queued (see Isolation ). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RemoteIndexService(GraphDatabaseService neo, String name)
IndexService
.
neo
- The RemoteGraphDatabase
that owns the index.name
- the token that the IndexService
was registered under
on the server (in
BasicGraphDatabaseServer.registerIndexService(String, IndexService)
).Method Detail |
---|
public void shutdown()
IndexService
Isolation
). After this method has been
invoked any following method invocation on this instance is invalid.
shutdown
in interface IndexService
public IndexHits<Node> getNodes(String key, Object value)
IndexService
key
and value
.
getNodes
in interface IndexService
key
- the key for indexvalue
- the value for index
public Node getSingleNode(String key, Object value)
IndexService
key
and
value
. If no such node exist null
is returned.
If more then one node is found a runtime exception is thrown.
getSingleNode
in interface IndexService
key
- the key for indexvalue
- the value for index
null
public void index(Node node, String key, Object value)
IndexService
node
with key
and value
. A
node can be associated with any number of key-value pairs.
Note about updating an index: If you've indexed a value from a property
on a Node
and that value gets updated, you'll have to remove the
old value in addition to indexing the new value, else both values (the
new and the old) will be indexed for that node.
When deleting a Node
, application should remove the index entries
for the node as well, to keep the index consistent with the node space.
index
in interface IndexService
node
- node to indexkey
- the key in the key-value pair to associate with node
.value
- the value in the key-value pair to associate with node
.public void removeIndex(Node node, String key, Object value)
IndexService
node
. If no such association
exist this method silently returns.
removeIndex
in interface IndexService
node
- the node to dissociate from the key-value pair.key
- the key in the key-value pair.value
- the value in the key-value pair.public void setIsolation(Isolation level)
RemoteIndexService
.
setIsolation
in interface IndexService
level
- the Isolation
level to set.IndexService.setIsolation(Isolation)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |