Package com.hubspot.jinjava.mode
Class EagerExecutionMode
- java.lang.Object
-
- com.hubspot.jinjava.mode.EagerExecutionMode
-
- All Implemented Interfaces:
ExecutionMode
- Direct Known Subclasses:
NonRevertingEagerExecutionMode
public class EagerExecutionMode extends Object implements ExecutionMode
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.collect.ImmutableSet<String>
STATIC_META_CONTEXT_VARIABLES
-
Constructor Summary
Constructors Modifier Constructor Description protected
EagerExecutionMode()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExecutionMode
instance()
boolean
isPreserveRawTags()
void
prepareContext(Context context)
boolean
useEagerContextReverting()
This will determine if the entire context can be reverted or if only the current scope can get reverted.boolean
useEagerParser()
-
-
-
Field Detail
-
STATIC_META_CONTEXT_VARIABLES
public static final com.google.common.collect.ImmutableSet<String> STATIC_META_CONTEXT_VARIABLES
-
-
Method Detail
-
instance
public static ExecutionMode instance()
-
isPreserveRawTags
public boolean isPreserveRawTags()
- Specified by:
isPreserveRawTags
in interfaceExecutionMode
-
useEagerParser
public boolean useEagerParser()
- Specified by:
useEagerParser
in interfaceExecutionMode
-
useEagerContextReverting
public boolean useEagerContextReverting()
Description copied from interface:ExecutionMode
This will determine if the entire context can be reverted or if only the current scope can get reverted. A snapshot of the context is created so it is expensive to do so with the entire context, but less expensive to only do that with the current scope- Specified by:
useEagerContextReverting
in interfaceExecutionMode
- Returns:
- whether the entire context (true) or just the current scope (false) will have a snapshot created to allow reverting of modified values in deferred execution mode.
-
prepareContext
public void prepareContext(Context context)
- Specified by:
prepareContext
in interfaceExecutionMode
-
-