|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RemoteConnection
Represents a connection to a remote site.
Method Summary | |
---|---|
int |
beginTransaction()
Start a new transaction. |
void |
close()
Close the remote connection, rolling back all active transactions. |
RemoteResponse<Void> |
closeNodeIterator(int transactionId,
int requestToken)
Close an iterator over nodes. |
RemoteResponse<Void> |
closePropertyKeyIterator(int transactionId,
int requestToken)
Close an iterator over property keys. |
RemoteResponse<Void> |
closeRelationshipIterator(int transactionId,
int requestToken)
Close an iterator over relationships. |
RemoteResponse<Void> |
closeRelationshipTypeIterator(int transactionId,
int requestToken)
Close an iterator over relationship types. |
void |
commit(int transactionId)
Commit a transaction. |
ClientConfigurator |
configure(Configuration config)
Co-configure the client and the server for this connection. |
RemoteResponse<NodeSpecification> |
createNode(int transactionId)
Create a new node. |
RemoteResponse<RelationshipSpecification> |
createRelationship(int transactionId,
String relationshipTypeName,
long startNodeId,
long endNodeId)
Create a new relationship. |
RemoteResponse<Void> |
deleteNode(int transactionId,
long nodeId)
Delete a node. |
RemoteResponse<Void> |
deleteRelationship(int transactionId,
long relationshipId)
Delete a relationship. |
RemoteResponse<IterableSpecification<NodeSpecification>> |
getAllNodes(int transactionId)
Get all nodes. |
RemoteResponse<IterableSpecification<RelationshipSpecification>> |
getAllRelationships(int transactionId,
long nodeId,
Direction direction)
Get all relationships from a given node. |
RemoteResponse<IterableSpecification<NodeSpecification>> |
getIndexNodes(int transactionId,
int indexId,
String key,
Object value)
Get all nodes stored under a specific value in a specific index. |
RemoteResponse<Integer> |
getIndexServiceId(String indexName)
Get the id of an index service. |
RemoteResponse<IterableSpecification<NodeSpecification>> |
getMoreNodes(int transactionId,
int requestToken)
Get the next chunk of the lazy iterator of nodes. |
RemoteResponse<IterableSpecification<String>> |
getMorePropertyKeys(int transactionId,
int requestToken)
Get the next chunk of the lazy iterator of property keys. |
RemoteResponse<IterableSpecification<RelationshipSpecification>> |
getMoreRelationships(int transactionId,
int requestToken)
Get the next chunk of the lazy iterator of relationships. |
RemoteResponse<IterableSpecification<String>> |
getMoreRelationshipTypes(int transactionId,
int requestToken)
Get the next chunk of the lazy iterator of relationship types. |
RemoteResponse<Object> |
getNodeProperty(int transactionId,
long nodeId,
String key)
Get a property from a node. |
RemoteResponse<IterableSpecification<String>> |
getNodePropertyKeys(int transactionId,
long nodeId)
Get the property keys for a node. |
RemoteResponse<NodeSpecification> |
getReferenceNode(int transactionId)
Get the reference node. |
RemoteResponse<RelationshipSpecification> |
getRelationshipById(int transactionId,
long relationshipId)
Get a relationship. |
RemoteResponse<Object> |
getRelationshipProperty(int transactionId,
long relationshipId,
String key)
Get a property from a relationship. |
RemoteResponse<IterableSpecification<String>> |
getRelationshipPropertyKeys(int transactionId,
long relationshipId)
Get the property keys for a relationship. |
RemoteResponse<IterableSpecification<RelationshipSpecification>> |
getRelationships(int transactionId,
long nodeId,
Direction direction,
String[] relationshipTypeNames)
Get relationships from a given node. |
RemoteResponse<IterableSpecification<String>> |
getRelationshipTypes(int transactionId)
Get the relationship types that are registered with the server. |
RemoteResponse<Boolean> |
hasNodeProperty(int transactionId,
long nodeId,
String key)
Check if a node has a specific property. |
RemoteResponse<Boolean> |
hasNodeWithId(int transactionId,
long nodeId)
Check if a node with the specified id exists. |
RemoteResponse<Boolean> |
hasRelationshipProperty(int transactionId,
long relationshipId,
String key)
Check if a relationship has a specific property. |
RemoteResponse<Void> |
indexNode(int transactionId,
int indexId,
long nodeId,
String key,
Object value)
Store a node in an index. |
RemoteResponse<Void> |
removeIndexNode(int transactionId,
int indexId,
long nodeId,
String key,
Object value)
Remove a node from an index. |
RemoteResponse<Object> |
removeNodeProperty(int transactionId,
long nodeId,
String key)
Remove a property from a node. |
RemoteResponse<Object> |
removeRelationshipProperty(int transactionId,
long relationshipId,
String key)
Remove a property from a relationship. |
void |
rollback(int transactionId)
Roll back a transaction. |
RemoteResponse<Object> |
setNodeProperty(int transactionId,
long nodeId,
String key,
Object value)
Set a property from a node. |
RemoteResponse<Object> |
setRelationshipProperty(int transactionId,
long relationshipId,
String key,
Object value)
Set a property from a relationship. |
Method Detail |
---|
ClientConfigurator configure(Configuration config)
config
- An object that represents the configuration of the client.
void close()
int beginTransaction()
void commit(int transactionId)
transactionId
- The id that represents the transaction to be committed.void rollback(int transactionId)
transactionId
- The id that represents the transaction to be rolled back.RemoteResponse<IterableSpecification<String>> getRelationshipTypes(int transactionId)
transactionId
- The id that represents the transaction the operation is
executed in.
RemoteResponse<IterableSpecification<String>> getMoreRelationshipTypes(int transactionId, int requestToken)
transactionId
- The id that represents the transaction the operation is
executed in.requestToken
- An id that represents the request.
RemoteResponse<Void> closeRelationshipTypeIterator(int transactionId, int requestToken)
transactionId
- The id that represents the transaction the operation is
executed in.requestToken
- An id that represents the request.
RemoteResponse<NodeSpecification> createNode(int transactionId)
transactionId
- the id of the transaction to create the node in.
RemoteResponse<NodeSpecification> getReferenceNode(int transactionId)
transactionId
- the id of the transaction to get the reference node in.
RemoteResponse<Boolean> hasNodeWithId(int transactionId, long nodeId)
transactionId
- the transaction to check for the node in.nodeId
- the id of the node to check for.
true
if the node exists, false
otherwise.RemoteResponse<Void> deleteNode(int transactionId, long nodeId)
transactionId
- the id of the transaction to delete the node in.nodeId
- the id of the node to delete.
RemoteResponse<IterableSpecification<NodeSpecification>> getAllNodes(int transactionId)
transactionId
- the id of the transaction to get all nodes in.
RemoteResponse<IterableSpecification<NodeSpecification>> getMoreNodes(int transactionId, int requestToken)
transactionId
- The id that represents the transaction the operation is
executed in.requestToken
- An id that represents the request.
RemoteResponse<Void> closeNodeIterator(int transactionId, int requestToken)
transactionId
- The id that represents the transaction the operation is
executed in.requestToken
- An id that represents the request.
RemoteResponse<RelationshipSpecification> createRelationship(int transactionId, String relationshipTypeName, long startNodeId, long endNodeId)
transactionId
- the id of the transaction to create the relationship in.relationshipTypeName
- the type name of the relationship to create.startNodeId
- the id of the start node for the relationship.endNodeId
- the id of the end node of the relationship.
RemoteResponse<RelationshipSpecification> getRelationshipById(int transactionId, long relationshipId)
transactionId
- the id of the transaction to get the relationship in.relationshipId
- the id of the relationship to get.
RemoteResponse<IterableSpecification<RelationshipSpecification>> getAllRelationships(int transactionId, long nodeId, Direction direction)
transactionId
- the id of the transaction to get the relationships in.nodeId
- the id of the node to get the relationships from.direction
- the direction of the relationships from the node.
RemoteResponse<IterableSpecification<RelationshipSpecification>> getRelationships(int transactionId, long nodeId, Direction direction, String[] relationshipTypeNames)
transactionId
- the id of the transaction to get the relationships in.nodeId
- the id of the node to get the relationships from.direction
- the direction of the relationships from the node.relationshipTypeNames
- the names of the relationship types to get.
RemoteResponse<IterableSpecification<RelationshipSpecification>> getMoreRelationships(int transactionId, int requestToken)
transactionId
- The id that represents the transaction the operation is
executed in.requestToken
- An id that represents the request.
RemoteResponse<Void> closeRelationshipIterator(int transactionId, int requestToken)
transactionId
- The id that represents the transaction the operation is
executed in.requestToken
- An id that represents the request.
RemoteResponse<Void> deleteRelationship(int transactionId, long relationshipId)
transactionId
- the id of the transaction to delete the relationship in.relationshipId
- the id of the relationship to delete.
RemoteResponse<Object> getNodeProperty(int transactionId, long nodeId, String key)
transactionId
- the id of the transaction to get the property in.nodeId
- the id of the node to get the property from.key
- the key for the property.
RemoteResponse<Object> getRelationshipProperty(int transactionId, long relationshipId, String key)
transactionId
- the id of the transaction to get the property in.relationshipId
- the id of the relationship to get the property from.key
- the key for the property.
RemoteResponse<Object> setNodeProperty(int transactionId, long nodeId, String key, Object value)
transactionId
- the id of the transaction to get the property in.nodeId
- the id of the node to get the property from.key
- the key for the property.value
- the new value for the property.
RemoteResponse<Object> setRelationshipProperty(int transactionId, long relationshipId, String key, Object value)
transactionId
- the id of the transaction to get the property in.relationshipId
- the id of the relationship to get the property from.key
- the key for the property.value
- the new value for the property.
RemoteResponse<IterableSpecification<String>> getNodePropertyKeys(int transactionId, long nodeId)
transactionId
- the id of the transaction to get the property keys in.nodeId
- the id of the node to get the property keys from.
RemoteResponse<IterableSpecification<String>> getRelationshipPropertyKeys(int transactionId, long relationshipId)
transactionId
- the id of the transaction to get the property keys in.relationshipId
- the id of the relationship to get the property keys from.
RemoteResponse<IterableSpecification<String>> getMorePropertyKeys(int transactionId, int requestToken)
transactionId
- The id that represents the transaction the operation is
executed in.requestToken
- An id that represents the request.
RemoteResponse<Void> closePropertyKeyIterator(int transactionId, int requestToken)
transactionId
- The id that represents the transaction the operation is
executed in.requestToken
- An id that represents the request.
RemoteResponse<Boolean> hasNodeProperty(int transactionId, long nodeId, String key)
transactionId
- the id of the transaction to check for the property in.nodeId
- the id of the node where the property should be sought after.key
- the property key.
true
if the node has ha property with the given key,
false
otherwise.RemoteResponse<Boolean> hasRelationshipProperty(int transactionId, long relationshipId, String key)
transactionId
- the id of the transaction to check for the property in.relationshipId
- the id of the relationship where the property should be sought
after.key
- the property key.
true
if the relationship has ha property with the
given key, false
otherwise.RemoteResponse<Object> removeNodeProperty(int transactionId, long nodeId, String key)
transactionId
- the id of the transaction to remove the property in.nodeId
- the id of the node to remove the property from.key
- the property key.
RemoteResponse<Object> removeRelationshipProperty(int transactionId, long relationshipId, String key)
transactionId
- the id of the transaction to remove the property in.relationshipId
- the id of the relationship to remove the property from.key
- the property key.
RemoteResponse<Integer> getIndexServiceId(String indexName)
indexName
- a string token that identifies the index service.
RemoteResponse<IterableSpecification<NodeSpecification>> getIndexNodes(int transactionId, int indexId, String key, Object value)
transactionId
- the id of the transaction to get the nodes in.indexId
- the id of the index service to get the nodes from.key
- the key for the index to get the nodes from.value
- the value that the nodes are stored under.
RemoteResponse<Void> indexNode(int transactionId, int indexId, long nodeId, String key, Object value)
transactionId
- the id of the transaction modify the index in.indexId
- the id of the index service to modify.nodeId
- the id of the node to store in the index.key
- the key for the index to store the node in.value
- the value that the node should be stored under.
RemoteResponse<Void> removeIndexNode(int transactionId, int indexId, long nodeId, String key, Object value)
transactionId
- the id of the transaction modify the index in.indexId
- the id of the index service to modify.nodeId
- the id of the node to remove from the index.key
- the key for the index the node is stored in.value
- the value that the node is stored under.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |