public static final class EvalCommand.EvalAction extends Object implements CliSession.Action, Session.TransactionalAction, Session.HasTransactionOptions
CliSession.Action
used by the EvalCommand
allowing access to the
EvalException
that occurred, if any.
This class is needed because EvalCommand
catches and handles EvalException
s
thrown during expression evaluation itself, swallowing them, making it appear as if the
command were always successful.
Modifier and Type | Method and Description |
---|---|
EvalException |
getEvalException()
Get the
EvalException that occurred when evaluating the expression, if any. |
Map<String,?> |
getTransactionOptions()
Get the options, if any, to be used when creating a new transaction for this action to run in.
|
void |
run(CliSession session)
Perform some action using the given
CliSession while a transaction is open. |
public void run(CliSession session) throws Exception
CliSession.Action
CliSession
while a transaction is open.run
in interface CliSession.Action
session
- session with open transactionException
- if an error occurspublic Map<String,?> getTransactionOptions()
Session.HasTransactionOptions
getTransactionOptions
in interface Session.HasTransactionOptions
KVDatabase
-specific transaction options, or null for nonepublic EvalException getEvalException()
EvalException
that occurred when evaluating the expression, if any.Copyright © 2022. All rights reserved.