Class InsertStatementBuilder.InsertStatement

java.lang.Object
com.tangosol.util.Base
com.tangosol.coherence.dslquery.statement.AbstractStatement
com.tangosol.coherence.dslquery.statement.InsertStatementBuilder.InsertStatement
All Implemented Interfaces:
Statement
Enclosing class:
InsertStatementBuilder

public static class InsertStatementBuilder.InsertStatement extends AbstractStatement
Implementation of the CohQL "INSERT" command.
  • Field Details

    • f_sCacheName

      protected final String f_sCacheName
      The cache name to be used in the CohQL "insert" command.
    • f_oKey

      protected final Object f_oKey
      The key to use to put the value into the cache.
    • f_oValue

      protected final Object f_oValue
      The value being inserted into the cache.
  • Constructor Details

    • InsertStatement

      public InsertStatement(String sCacheName, Object oKey, Object oValue)
      Construct a InsertStatement that will insert the specified key and value into the specified cache.
      Parameters:
      sCacheName - then name of the cache to insert the key and value into
      oKey - the key of the entry to insert into the cache
      oValue - the value to insert into the cache
  • Method Details

    • execute

      public StatementResult execute(ExecutionContext ctx)
      Description copied from interface: Statement
      Execute a CohQL query or command and return the relevant result.
      Parameters:
      ctx - the context to use
      Returns:
      a StatementResult containing the results of executing the statement
    • executeAsync

      Description copied from interface: Statement
      Execute a CohQL query or command asynchronously and return the CompletableFuture with the relevant result.
      Parameters:
      ctx - the context to use
      Returns:
      a StatementResult future containing the results of executing the statement
    • showPlan

      public void showPlan(PrintWriter out)
      Description copied from interface: Statement
      Output to the provided PrintWriter a human readable trace of the actions that will be taken by this statement if or when executed.
      Parameters:
      out - the PrintWriter to write the trace to
    • sanityCheck

      public void sanityCheck(ExecutionContext ctx)
      Description copied from interface: Statement
      Perform sanity checks on the statement that will be executed.

      Implementations can fail sanity checking by throwing an unchecked exception (RuntimeException).

      Specified by:
      sanityCheck in interface Statement
      Overrides:
      sanityCheck in class AbstractStatement
      Parameters:
      ctx - the context to use