public interface SessionInterface extends Closeable
Modifier and Type | Method and Description |
---|---|
void |
addTemporaryLob(Value v)
Add a temporary LOB, which is closed when the session commits.
|
void |
afterWriting()
Called after writing has ended.
|
void |
cancel()
Cancel the current or next command (called when closing a connection).
|
void |
close()
Roll back pending transactions and close the session.
|
boolean |
getAutoCommit()
Check if this session is in auto-commit mode.
|
ArrayList<String> |
getClusterServers()
Get the list of the cluster servers for this session.
|
String |
getCurrentSchemaName()
Get current schema as in
JdbcConnection#getSchema() . |
DataHandler |
getDataHandler()
Get the data handler object.
|
int |
getPowerOffCount()
Get the number of disk operations before power failure is simulated.
|
Trace |
getTrace()
Get the trace object
|
boolean |
hasPendingTransaction()
Check whether this session has a pending transaction.
|
boolean |
isClosed()
Check if close was called.
|
boolean |
isReconnectNeeded(boolean write)
Check if the database changed and therefore reconnecting is required.
|
boolean |
isRemote()
Check if this session is remote or embedded.
|
CommandInterface |
prepareCommand(String sql,
int fetchSize)
Parse a command and prepare it for execution.
|
SessionInterface |
reconnect(boolean write)
Close the connection and open a new connection.
|
void |
setAutoCommit(boolean autoCommit)
Set the auto-commit mode.
|
void |
setCurrentSchemaName(String schema)
Set current schema as in
JdbcConnection#setSchema(String) . |
void |
setPowerOffCount(int i)
Set the number of disk operations before power failure is simulated.
|
ArrayList<String> getClusterServers()
CommandInterface prepareCommand(String sql, int fetchSize)
sql
- the SQL statementfetchSize
- the number of rows to fetch in one stepvoid close()
close
in interface AutoCloseable
close
in interface Closeable
Trace getTrace()
boolean isClosed()
int getPowerOffCount()
void setPowerOffCount(int i)
i
- the number of operationsDataHandler getDataHandler()
boolean hasPendingTransaction()
void cancel()
boolean isReconnectNeeded(boolean write)
write
- if the next operation may be writingSessionInterface reconnect(boolean write)
write
- if the next operation may be writingvoid afterWriting()
boolean getAutoCommit()
void setAutoCommit(boolean autoCommit)
autoCommit
- the new valuevoid addTemporaryLob(Value v)
v
- the valueboolean isRemote()
void setCurrentSchemaName(String schema)
JdbcConnection#setSchema(String)
.schema
- the schema nameString getCurrentSchemaName()
JdbcConnection#getSchema()
.Copyright © 2017 JBoss by Red Hat. All rights reserved.