public class StatementHolder extends Object
Statement object which allows us to augment it with useful "state"
information. The instances of this class are used as a cached value (in a ConcurrentMap cache
implementation) for the invocations of Connection.prepareStatement and Connection.prepareCall
methods, and their "state" is describing whether the Statement object is currently AVAILABLE, IN_USE,
or EVICTED.StatementMethod| Modifier and Type | Class and Description |
|---|---|
static class |
StatementHolder.State
The 3 different states in which a StatementHolder instance can be when it is used as a cached value:
|
| Constructor and Description |
|---|
StatementHolder(Statement rawStatement,
AtomicReference<StatementHolder.State> state,
String sqlQuery) |
| Modifier and Type | Method and Description |
|---|---|
String |
getSqlQuery() |
Statement |
rawStatement() |
void |
setSqlQuery(String sqlQuery) |
AtomicReference<StatementHolder.State> |
state() |
public StatementHolder(Statement rawStatement, AtomicReference<StatementHolder.State> state, String sqlQuery)
public Statement rawStatement()
public AtomicReference<StatementHolder.State> state()
public String getSqlQuery()
public void setSqlQuery(String sqlQuery)
Copyright © 2013-2019 vibur.org. All Rights Reserved.