| java.lang.Object hu.netmind.persistence.node.NodeClient
NodeClient | public class NodeClient implements ServiceProvider(Code) | | A node service provider implmenetation, which uses a connection
to a server node to delegate functionality.
author: Brautigam Robert version: Revision: $Revision$ |
Inner Class :public class MessageListener implements Runnable | |
Method Summary | |
public synchronized void | connect(String ips, int port) Connect to server. | public synchronized void | disconnect() Disconnect the client. | public void | endCommit(int index, Long serial) Mark the end of a commit phase. | public Long | getNextSerial() Get the next serial for database functions. | public void | handleMessage(CommObject obj) Server notification messages. | public static boolean | isAlive(String ips, int port) Determine if an address is available. | public SessionInfo | lock(int index, long threadId, long txSerial, List metas, SessionInfo info, int wait, boolean ensureCurrent) Lock an object. | public void | notifyChange(List metas, Long endSerial, Long txSerial) Notify the server of object changes. | public synchronized GenericResponse | sendObject(CommObject obj) Send a message to the server and wait for a response. | public Long | startCommit(int index) Wait for starting a commit. | public void | unlock(int index, long threadId, long txSerial, List metas) Unlock object. | public void | updateEntries(String tableName, Long serial) Send cache update request. | public void | waitForQuery(Long serial) Wait for a query to execute with the given serial. |
connect | public synchronized void connect(String ips, int port)(Code) | | Connect to server.
|
disconnect | public synchronized void disconnect()(Code) | | Disconnect the client.
|
endCommit | public void endCommit(int index, Long serial)(Code) | | Mark the end of a commit phase.
|
getNextSerial | public Long getNextSerial()(Code) | | Get the next serial for database functions. Send request to
server, and wait for a serial response.
|
handleMessage | public void handleMessage(CommObject obj)(Code) | | Server notification messages.
|
isAlive | public static boolean isAlive(String ips, int port)(Code) | | Determine if an address is available.
|
notifyChange | public void notifyChange(List metas, Long endSerial, Long txSerial)(Code) | | Notify the server of object changes.
|
sendObject | public synchronized GenericResponse sendObject(CommObject obj)(Code) | | Send a message to the server and wait for a response.
If the connection is lost, a re-connect is tried once.
|
startCommit | public Long startCommit(int index)(Code) | | Wait for starting a commit. The commit can start if
there are no queries executed with greater serial.
The serial the commit can run with. |
unlock | public void unlock(int index, long threadId, long txSerial, List metas)(Code) | | Unlock object.
|
updateEntries | public void updateEntries(String tableName, Long serial)(Code) | | Send cache update request.
|
waitForQuery | public void waitForQuery(Long serial)(Code) | | Wait for a query to execute with the given serial.
This method returns, if all commits before the given serial
are finished.
|
|
|