| java.lang.Object hu.netmind.persistence.node.NodeServer
NodeServer | public class NodeServer implements ServiceProvider,Runnable(Code) | | Implementation of a server node. This is a synchronization
point for all nodes connected to the same database.
author: Brautigam Robert version: Revision: $Revision$ |
Inner Class :public class ClientHandler implements Runnable | |
Method Summary | |
public void | activate() Activate server, this means read the maximal serial from
database and set the active flag. | public void | bind() Setup server and bind to a random port. | public void | broadcastObject(CommObject obj) Broadcast a message to all connected clients. | public void | disconnect() Disconnect the server. | public void | endCommit(int index, Long serial) Mark the end of a commit phase. | public static String | getHostAddresses() Get the server addresses from interfaces. | public Long | getNextSerial() Get a new serial number. | public ServerSocket | getServerSocket() | public boolean | isActive() | 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) Add a change notification to change tracker. | public void | run() Run listener thread. | public void | setServerSocket(ServerSocket serverSocket) | 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) Update entries of client caches according to received parameters. | public void | waitForQuery(Long serial) Wait for a query to execute with the given serial. |
activate | public void activate()(Code) | | Activate server, this means read the maximal serial from
database and set the active flag.
|
bind | public void bind()(Code) | | Setup server and bind to a random port.
|
broadcastObject | public void broadcastObject(CommObject obj)(Code) | | Broadcast a message to all connected clients.
|
disconnect | public void disconnect()(Code) | | Disconnect the server.
|
endCommit | public void endCommit(int index, Long serial)(Code) | | Mark the end of a commit phase.
|
getHostAddresses | public static String getHostAddresses()(Code) | | Get the server addresses from interfaces.
|
getNextSerial | public Long getNextSerial()(Code) | | Get a new serial number.
|
isActive | public boolean isActive()(Code) | | |
notifyChange | public void notifyChange(List metas, Long endSerial, Long txSerial)(Code) | | Add a change notification to change tracker.
|
run | public void run()(Code) | | Run listener thread. This thread accepts incoming connections,
and incoming socket data.
|
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) | | Update entries of client caches according to received parameters.
|
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.
|
|
|