SessionRemote

The client side part of a session when using the server mode. This object communicates with a Session on the server side.

Methods
void addTemporaryLob(Value v)
void addTemporaryLob(Value v)
void afterWriting()
void afterWriting()
void autoCommitIfCluster()
Calls COMMIT if the session is in cluster mode.
void autoCommitIfCluster()
Calls COMMIT if the session is in cluster mode.
void cancel()
void cancel()
void cancelStatement(int id)
Cancel the statement with the given id.
void cancelStatement(int id)
Cancel the statement with the given id.
Parameters:
id - the statement id
void checkClosed()
Check if this session is closed and throws an exception if so.
void checkClosed()
Check if this session is closed and throws an exception if so.
Throws:
DbException - if the session is closed
void checkPowerOff()
void checkPowerOff()
void checkWritingAllowed()
void checkWritingAllowed()
void close()
void close()
SessionInterface connectEmbeddedOrServer(boolean openNew)
Open a new (remote or embedded) session.
SessionInterface connectEmbeddedOrServer(boolean openNew)
Open a new (remote or embedded) session.
Parameters:
openNew - whether to open a new session in any case
Returns:
the session
void done(Transfer transfer)
Called to flush the output after data has been sent to the server and just before receiving data.
void done(Transfer transfer) throws IOException
Called to flush the output after data has been sent to the server and just before receiving data. This method also reads the status code from the server and throws any exception the server sent.
Parameters:
transfer - the transfer object
Throws:
DbException - if the server sent an exception
IOException - if there is a communication problem between client and server
boolean getAutoCommit()
boolean getAutoCommit()
int getCurrentId()
int getCurrentId()
DataHandler getDataHandler()
DataHandler getDataHandler()
String getDatabasePath()
String getDatabasePath()
JavaObjectSerializer getJavaObjectSerializer()
JavaObjectSerializer getJavaObjectSerializer()
int getLastReconnect()
int getLastReconnect()
String getLobCompressionAlgorithm(int type)
String getLobCompressionAlgorithm(int type)
SmallLRUCache getLobFileListCache()
SmallLRUCache getLobFileListCache()
LobStorageInterface getLobStorage()
LobStorageInterface getLobStorage()
Object getLobSyncObject()
Object getLobSyncObject()
int getMaxLengthInplaceLob()
int getMaxLengthInplaceLob()
int getNextId()
int getNextId()
int getPowerOffCount()
int getPowerOffCount()
TempFileDeleter getTempFileDeleter()
TempFileDeleter getTempFileDeleter()
Trace getTrace()
Trace getTrace()
boolean hasPendingTransaction()
boolean hasPendingTransaction()
boolean isClosed()
boolean isClosed()
boolean isClustered()
Returns true if the connection was opened in cluster mode.
boolean isClustered()
Returns true if the connection was opened in cluster mode.
Returns:
true if it is
boolean isReconnectNeeded(boolean write)
boolean isReconnectNeeded(boolean write)
FileStore openFile(String name, String mode, boolean mustExist)
FileStore openFile(String name, String mode, boolean mustExist)
CommandInterface prepareCommand(String sql, int fetchSize)
CommandInterface prepareCommand(String sql, int fetchSize)
int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length)
int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length)
SessionInterface reconnect(boolean write)
SessionInterface reconnect(boolean write)
void removeServer(IOException e, int i, int count)
Remove a server from the list of cluster nodes and disables the cluster mode.
void removeServer(IOException e, int i, int count)
Remove a server from the list of cluster nodes and disables the cluster mode.
Parameters:
e - the exception (used for debugging)
i - the index of the server to remove
count - the retry count index
void setAutoCommit(boolean autoCommit)
void setAutoCommit(boolean autoCommit)
void setAutoCommitFromServer(boolean autoCommit)
void setAutoCommitFromServer(boolean autoCommit)
void setPowerOffCount(int count)
void setPowerOffCount(int count)
void traceOperation(String operation, int id)
Write the operation to the trace system if debug trace is enabled.
void traceOperation(String operation, int id)
Write the operation to the trace system if debug trace is enabled.
Parameters:
operation - the operation performed
id - the id of the operation