public class SessionStateServiceImpl extends java.lang.Object implements SessionStateService
| Modifier and Type | Field and Description |
|---|---|
protected SessionState |
copySessionState |
protected PluginService |
pluginService |
protected java.util.Properties |
props |
protected SessionState |
sessionState |
| Constructor and Description |
|---|
SessionStateServiceImpl(@NonNull PluginService pluginService,
@NonNull java.util.Properties props) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyCurrentSessionState(java.sql.Connection newConnection) |
void |
applyPristineSessionState(java.sql.Connection connection) |
void |
begin() |
void |
complete() |
java.util.Optional<java.lang.Boolean> |
getAutoCommit() |
java.util.Optional<java.lang.String> |
getCatalog() |
java.util.Optional<java.lang.Integer> |
getHoldability() |
java.util.Optional<java.lang.Integer> |
getNetworkTimeout() |
java.util.Optional<java.lang.Boolean> |
getReadOnly() |
java.util.Optional<java.lang.String> |
getSchema() |
java.util.Optional<java.lang.Integer> |
getTransactionIsolation() |
java.util.Optional<java.util.Map<java.lang.String,java.lang.Class<?>>> |
getTypeMap() |
void |
logCurrentState() |
void |
reset() |
protected boolean |
resetStateEnabledSetting() |
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(java.lang.String catalog) |
void |
setHoldability(int holdability) |
void |
setNetworkTimeout(int milliseconds) |
void |
setReadOnly(boolean readOnly) |
void |
setSchema(java.lang.String schema) |
void |
setTransactionIsolation(int level) |
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map) |
void |
setupPristineAutoCommit() |
void |
setupPristineAutoCommit(boolean autoCommit) |
void |
setupPristineCatalog() |
void |
setupPristineCatalog(java.lang.String catalog) |
void |
setupPristineHoldability() |
void |
setupPristineHoldability(int holdability) |
void |
setupPristineNetworkTimeout() |
void |
setupPristineNetworkTimeout(int milliseconds) |
void |
setupPristineReadOnly() |
void |
setupPristineReadOnly(boolean readOnly) |
void |
setupPristineSchema() |
void |
setupPristineSchema(java.lang.String schema) |
void |
setupPristineTransactionIsolation() |
void |
setupPristineTransactionIsolation(int level) |
void |
setupPristineTypeMap() |
void |
setupPristineTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map) |
protected boolean |
transferStateEnabledSetting() |
protected SessionState sessionState
protected SessionState copySessionState
protected final PluginService pluginService
protected final java.util.Properties props
public SessionStateServiceImpl(@NonNull PluginService pluginService, @NonNull java.util.Properties props)
protected boolean transferStateEnabledSetting()
protected boolean resetStateEnabledSetting()
public java.util.Optional<java.lang.Boolean> getAutoCommit()
throws java.sql.SQLException
getAutoCommit in interface SessionStateServicejava.sql.SQLExceptionpublic void setAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setAutoCommit in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineAutoCommit()
throws java.sql.SQLException
setupPristineAutoCommit in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineAutoCommit(boolean autoCommit)
throws java.sql.SQLException
setupPristineAutoCommit in interface SessionStateServicejava.sql.SQLExceptionpublic java.util.Optional<java.lang.Boolean> getReadOnly()
throws java.sql.SQLException
getReadOnly in interface SessionStateServicejava.sql.SQLExceptionpublic void setReadOnly(boolean readOnly)
throws java.sql.SQLException
setReadOnly in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineReadOnly()
throws java.sql.SQLException
setupPristineReadOnly in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineReadOnly(boolean readOnly)
throws java.sql.SQLException
setupPristineReadOnly in interface SessionStateServicejava.sql.SQLExceptionpublic java.util.Optional<java.lang.String> getCatalog()
throws java.sql.SQLException
getCatalog in interface SessionStateServicejava.sql.SQLExceptionpublic void setCatalog(java.lang.String catalog)
throws java.sql.SQLException
setCatalog in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineCatalog()
throws java.sql.SQLException
setupPristineCatalog in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineCatalog(java.lang.String catalog)
throws java.sql.SQLException
setupPristineCatalog in interface SessionStateServicejava.sql.SQLExceptionpublic java.util.Optional<java.lang.Integer> getHoldability()
throws java.sql.SQLException
getHoldability in interface SessionStateServicejava.sql.SQLExceptionpublic void setHoldability(int holdability)
throws java.sql.SQLException
setHoldability in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineHoldability()
throws java.sql.SQLException
setupPristineHoldability in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineHoldability(int holdability)
throws java.sql.SQLException
setupPristineHoldability in interface SessionStateServicejava.sql.SQLExceptionpublic java.util.Optional<java.lang.Integer> getNetworkTimeout()
throws java.sql.SQLException
getNetworkTimeout in interface SessionStateServicejava.sql.SQLExceptionpublic void setNetworkTimeout(int milliseconds)
throws java.sql.SQLException
setNetworkTimeout in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineNetworkTimeout()
throws java.sql.SQLException
setupPristineNetworkTimeout in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineNetworkTimeout(int milliseconds)
throws java.sql.SQLException
setupPristineNetworkTimeout in interface SessionStateServicejava.sql.SQLExceptionpublic java.util.Optional<java.lang.String> getSchema()
throws java.sql.SQLException
getSchema in interface SessionStateServicejava.sql.SQLExceptionpublic void setSchema(java.lang.String schema)
throws java.sql.SQLException
setSchema in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineSchema()
throws java.sql.SQLException
setupPristineSchema in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineSchema(java.lang.String schema)
throws java.sql.SQLException
setupPristineSchema in interface SessionStateServicejava.sql.SQLExceptionpublic java.util.Optional<java.lang.Integer> getTransactionIsolation()
throws java.sql.SQLException
getTransactionIsolation in interface SessionStateServicejava.sql.SQLExceptionpublic void setTransactionIsolation(int level)
throws java.sql.SQLException
setTransactionIsolation in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineTransactionIsolation()
throws java.sql.SQLException
setupPristineTransactionIsolation in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineTransactionIsolation(int level)
throws java.sql.SQLException
setupPristineTransactionIsolation in interface SessionStateServicejava.sql.SQLExceptionpublic java.util.Optional<java.util.Map<java.lang.String,java.lang.Class<?>>> getTypeMap()
throws java.sql.SQLException
getTypeMap in interface SessionStateServicejava.sql.SQLExceptionpublic void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
setTypeMap in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineTypeMap()
throws java.sql.SQLException
setupPristineTypeMap in interface SessionStateServicejava.sql.SQLExceptionpublic void setupPristineTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws java.sql.SQLException
setupPristineTypeMap in interface SessionStateServicejava.sql.SQLExceptionpublic void reset()
reset in interface SessionStateServicepublic void begin()
throws java.sql.SQLException
begin in interface SessionStateServicejava.sql.SQLExceptionpublic void complete()
complete in interface SessionStateServicepublic void applyCurrentSessionState(java.sql.Connection newConnection)
throws java.sql.SQLException
applyCurrentSessionState in interface SessionStateServicejava.sql.SQLExceptionpublic void applyPristineSessionState(java.sql.Connection connection)
throws java.sql.SQLException
applyPristineSessionState in interface SessionStateServicejava.sql.SQLExceptionpublic void logCurrentState()