public class PrepareResult extends Object
Constructor and Description |
---|
PrepareResult(int statementId,
ColumnInformation[] columns,
ColumnInformation[] parameters,
Protocol unProxiedProtocol,
boolean executeOnMaster)
PrepareStatement Result object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeDeallocate()
Asked if can be deallocate (is not shared in other statement and not in cache)
Set deallocate flag to true if so.
|
void |
decrementShareCounter() |
void |
failover(int statementId,
Protocol unProxiedProtocol)
Update information after a failover.
|
ColumnInformation[] |
getColumns() |
ColumnInformation[] |
getParameters() |
int |
getShareCounter() |
int |
getStatementId() |
Protocol |
getUnProxiedProtocol() |
boolean |
incrementShareCounter()
Increment share counter.
|
boolean |
isExecuteOnMaster() |
boolean |
mustRePrepareOnSlave()
If PrepareStatement was executed initially on slave connection, but after a failover, was using temporary the master connection,
indicate if has to be reprepare on Slave connection when reconnected.
|
void |
setAddToCache() |
void |
setRemoveFromCache() |
public PrepareResult(int statementId, ColumnInformation[] columns, ColumnInformation[] parameters, Protocol unProxiedProtocol, boolean executeOnMaster)
statementId
- server statement Id.columns
- columns informationparameters
- parameters informationunProxiedProtocol
- indicate the protocol on which the prepare has been doneexecuteOnMaster
- must normally execute on master ?public void failover(int statementId, Protocol unProxiedProtocol)
statementId
- new statement IdunProxiedProtocol
- the protocol on which the prepare has been donepublic void setAddToCache()
public void setRemoveFromCache()
public boolean incrementShareCounter()
public void decrementShareCounter()
public boolean canBeDeallocate()
public int getShareCounter()
public int getStatementId()
public ColumnInformation[] getColumns()
public ColumnInformation[] getParameters()
public Protocol getUnProxiedProtocol()
public boolean mustRePrepareOnSlave()
public boolean isExecuteOnMaster()
Copyright © 2016. All rights reserved.