|
||||||||||
| 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 IndexServices are registered on
the server using
BasicGraphDatabaseServer.registerIndexService(String, IndexService).
| Constructor Summary | |
|---|---|
RemoteIndexService(GraphDatabaseService graphDb,
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)
Dissociates a node from all indexed values for the given key. |
void |
removeIndex(Node node,
String key,
Object value)
Dissociates a key-value pair from node. |
void |
removeIndex(String key)
Dissociates all key-value pairs which key is part of, i.e. |
void |
shutdown()
Shuts down the index service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteIndexService(GraphDatabaseService graphDb,
String name)
IndexService.
graphDb - 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
shutdown in interface IndexService
public IndexHits<Node> getNodes(String key,
Object value)
IndexServicekey and value.
getNodes in interface IndexServicekey - the key for indexvalue - the value for index
public Node getSingleNode(String key,
Object value)
IndexServicekey 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 IndexServicekey - the key for indexvalue - the value for index
null
public void index(Node node,
String key,
Object value)
IndexServicenode 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 IndexServicenode - 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)
IndexServicenode. If no such association
exist this method silently returns.
removeIndex in interface IndexServicenode - 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 removeIndex(Node node,
String key)
IndexServicekey.
If no such association exists this method silently returns.
Implementations may choose to not implement this method and should
in such a case throw UnsupportedOperationException.
removeIndex in interface IndexServicenode - the node to dissociate from all indexed values for the given
key.key - the key in the key-value pairs to remove.public void removeIndex(String key)
IndexServicekey is part of, i.e.
clearing the an entire index key is cleared.
Implementations may choose to not implement this method and should
in such a case throw UnsupportedOperationException.
removeIndex in interface IndexServicekey - the index to clear.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||