public interface SessionInterface extends Closeable
Modifier and Type | Method and Description |
---|---|
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.
|
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 |
isClosed()
Check if close was called.
|
boolean |
isReconnectNeeded(boolean write)
Check if the database changed and therefore reconnecting is required.
|
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 |
setPowerOffCount(int i)
Set the number of disk operations before power failure is simulated.
|
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()
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 valueCopyright © 2012 JBoss by Red Hat. All Rights Reserved.