Class DefaultContext
java.lang.Object
com.lucidworks.apollo.pipeline.impl.DefaultContext
- All Implemented Interfaces:
Context,PropertyContext,Map<String,Object>
Context implementation backed by a ConcurrentHashMap. Read operations will look into this map, and then the parent
(if the parent exists). Mutating operations will only affect this map
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.lucidworks.apollo.pipeline.Context
Context.Signal -
Field Summary
FieldsFields inherited from interface com.lucidworks.apollo.pipeline.Context
ANNOTATED_QUERY, ASYNC, AUTHZ_CONTEXT, COLLECTION_PROPERTY, DEBUG, Echo, EchoMaxCount, EndOfBatchSignal, EXCLUDE_EXTENSIONS, EXPERIMENT_COLLECTION_FOR_SIGNALS, EXPERIMENT_ID, EXPERIMENT_VARIANT, HTTP_METHOD, INNER_PIPELINE, JobId, PipelineId, PipeLineInstanceId, REQUEST_CONTENT_TYPE, REQUEST_HANDLER, REQUEST_HEADERS, REQUEST_PARAMS, RESPONSE_TRANSFORMER, Signal, Simulate, SIMULATE, SolrCommitSignal, SolrDeleteByIdSignal, SolrDeleteByQuerySignal, STAGE_INDEX, Stats, ThrowOnError -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> TcastFromClass(Object value, Class<T> clazz) voidclear()voidbooleancontainsKey(Object key) booleancontainsValue(Object value) copyOf()entrySet()flatten()getBoolean(String key) getBoolean(String key, boolean def) Return this context's immediate parentDeprecated.getProperty(String name) <T> TgetProperty(String name, Class<T> clazz) <T> TgetProperty(String name, T def) <T> TgetProperty(String name, T def, Class<T> clazz) booleanhasProperty(String key) booleanisEmpty()booleanisSignal()booleankeySet()newChildContext(StageCallback callback) static DefaultContextstatic DefaultContextnewContext(StageCallback callback) voidremoveProperty(String key) Deprecated.<T> TremoveProperty(String key, T def) Deprecated.voidsetProperties(Map<String, Object> props) voidsetProperty(String key, Object value) voidvoidsetStageCallback(StageCallback<?> stageCallback) intsize()toString()values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
DEFAULT_CONTEXT_FACTORY
-
-
Method Details
-
copyOf
-
newContext
-
newContext
-
newChildContext
- Specified by:
newChildContextin interfaceContext
-
newChildContext
- Specified by:
newChildContextin interfaceContext
-
getParentContext
Description copied from interface:ContextReturn this context's immediate parent- Specified by:
getParentContextin interfaceContext- Returns:
-
isSignal
-
isSignal
public boolean isSignal() -
getSignal
-
setSignal
-
clearSignal
public void clearSignal()- Specified by:
clearSignalin interfaceContext
-
getRequestHeaders
- Specified by:
getRequestHeadersin interfaceContext
-
getInt
- Specified by:
getIntin interfacePropertyContext
-
getInt
- Specified by:
getIntin interfacePropertyContext
-
getLong
- Specified by:
getLongin interfacePropertyContext
-
getLong
- Specified by:
getLongin interfacePropertyContext
-
getDouble
- Specified by:
getDoublein interfacePropertyContext
-
getDouble
- Specified by:
getDoublein interfacePropertyContext
-
getBoolean
- Specified by:
getBooleanin interfacePropertyContext
-
getBoolean
- Specified by:
getBooleanin interfacePropertyContext
-
getString
- Specified by:
getStringin interfacePropertyContext
-
getString
- Specified by:
getStringin interfacePropertyContext
-
set
- Specified by:
setin interfaceContext- Specified by:
setin interfacePropertyContext
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
get
-
put
-
putAll
-
remove
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
flatten
-
getProperties
Deprecated. -
removeProperty
Deprecated.- Specified by:
removePropertyin interfaceContext
-
removeProperty
Deprecated. -
hasProperty
- Specified by:
hasPropertyin interfaceContext
-
getProperty
- Specified by:
getPropertyin interfaceContext
-
getProperty
-
getProperty
- Specified by:
getPropertyin interfaceContext
-
getProperty
-
setProperty
- Specified by:
setPropertyin interfaceContext
-
setProperties
- Specified by:
setPropertiesin interfaceContext
-
getStageCallback
- Specified by:
getStageCallbackin interfaceContext
-
setStageCallback
- Specified by:
setStageCallbackin interfaceContext
-
toString
-
castFromClass
-