|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neo4j.remote.BasicGraphDatabaseServer
public abstract class BasicGraphDatabaseServer
A Basic implementation of a Server for a remote graph database. This implementation relies
on the GraphDatabaseService
API to perform the actions of the remote graph database
communication protocol.
To make a concrete implementation the subclass needs to implement the two
abstract methods that provide a GraphDatabaseService
implementation upon
connection. One for authenticated connection and one for unauthenticated
connection. One also needs to provide the transaction manager used by the
GraphDatabaseService
to the constructor of the server.
Constructor Summary | |
---|---|
protected |
BasicGraphDatabaseServer(TransactionManager txManager)
Create a new server for a remote graph database. |
Method Summary | |
---|---|
RemoteConnection |
connect()
Connect to the remote site. |
RemoteConnection |
connect(String username,
String password)
Connect to the remote site. |
protected abstract GraphDatabaseService |
connectGraphDatabase()
Create an unauthenticated connection. |
protected abstract GraphDatabaseService |
connectGraphDatabase(String username,
String password)
Create an authenticated connection. |
protected int |
getKeysBatchSize(int returned)
Get the size of the next batch of property keys sent to the client in an iteration. |
protected int |
getNodesBatchSize(int returned)
Get the size of the next batch of Node s sent to the client in an
iteration. |
protected int |
getRelationshipsBatchSize(int returned)
Get the size of the next batch of Relationship s sent to the
client in an iteration. |
long |
getTotalNumberOfNodes(GraphDatabaseService neo)
|
protected int |
getTypesBatchSize(int returned)
Get the size of the next batch of RelationshipType s sent to the
client in an iteration. |
void |
registerIndexService(String name,
IndexService index)
Register a server side index service implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BasicGraphDatabaseServer(TransactionManager txManager)
txManager
- The transaction manager to use on the server.Method Detail |
---|
protected abstract GraphDatabaseService connectGraphDatabase()
GraphDatabaseService
implementation to use for the connection.protected abstract GraphDatabaseService connectGraphDatabase(String username, String password)
username
- The name of the authenticating user.password
- The password for the authenticating user.
GraphDatabaseService
implementation to use for the connection.protected int getNodesBatchSize(int returned)
Node
s sent to the client in an
iteration.
Override to change the default batch size or create a smarter batching
scheme.
returned
- The number of previously returned elements in the iteration.
protected int getTypesBatchSize(int returned)
RelationshipType
s sent to the
client in an iteration.
Override to change the default batch size or create a smarter batching
scheme.
returned
- The number of previously returned elements in the iteration.
protected int getRelationshipsBatchSize(int returned)
Relationship
s sent to the
client in an iteration.
Override to change the default batch size or create a smarter batching
scheme.
returned
- The number of previously returned elements in the iteration.
protected int getKeysBatchSize(int returned)
returned
- The number of previously returned elements in the iteration.
public void registerIndexService(String name, IndexService index)
name
- A name that identifies the index service implementation.index
- The index service implementation to register.public final RemoteConnection connect()
ConnectionTarget
connect
in interface ConnectionTarget
public RemoteConnection connect(String username, String password)
ConnectionTarget
connect
in interface ConnectionTarget
username
- The name of the user that makes the connection.password
- The password for the user that makes the connection.
public long getTotalNumberOfNodes(GraphDatabaseService neo)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |