Class ServerPrepareResult

    • Constructor Detail

      • ServerPrepareResult

        public ServerPrepareResult​(String sql,
                                   int statementId,
                                   ColumnDefinition[] columns,
                                   ColumnDefinition[] parameters,
                                   Protocol unProxiedProtocol)
        PrepareStatement Result object.
        Parameters:
        sql - query
        statementId - server statement Id.
        columns - columns information
        parameters - parameters information
        unProxiedProtocol - indicate the protocol on which the prepare has been done
    • Method Detail

      • resetParameterTypeHeader

        public void resetParameterTypeHeader()
      • failover

        public void failover​(int statementId,
                             Protocol unProxiedProtocol)
        Update information after a failover.
        Parameters:
        statementId - new statement Id
        unProxiedProtocol - the protocol on which the prepare has been done
      • setAddToCache

        public void setAddToCache()
      • setRemoveFromCache

        public void setRemoveFromCache()
      • incrementShareCounter

        public boolean incrementShareCounter()
        Increment share counter.
        Returns:
        true if can be used (is not been deallocate).
      • decrementShareCounter

        public void decrementShareCounter()
      • canBeDeallocate

        public boolean canBeDeallocate()
        Asked if can be deallocate (is not shared in other statement and not in cache) Set deallocate flag to true if so.
        Returns:
        true if can be deallocate
      • getShareCounter

        public int getShareCounter()
      • getStatementId

        public int getStatementId()
      • getUnProxiedProtocol

        public Protocol getUnProxiedProtocol()
      • getParameterTypeHeader

        public ColumnType[] getParameterTypeHeader()