Package io.iworkflow.core.persistence
Class PersistenceImpl
java.lang.Object
io.iworkflow.core.persistence.PersistenceImpl
- All Implemented Interfaces:
DataAttributesRW,Persistence,SearchAttributesRW,StateExecutionLocals
-
Field Summary
Fields inherited from interface io.iworkflow.core.persistence.SearchAttributesRW
DateTimeFormat -
Constructor Summary
ConstructorsConstructorDescriptionPersistenceImpl(DataAttributesRW dataAttributesRW, SearchAttributesRW searchAttributesRW, StateExecutionLocals stateExecutionLocals) -
Method Summary
Modifier and TypeMethodDescription<T> TgetDataAttribute(String key, Class<T> type) <T> TgetStateExecutionLocal(String key, Class<T> type) Retrieve a local state attribute User code must make sure using the same type for both get and setvoidrecordEvent(String key, Object... eventData) Record an arbitrary event in State Start/Decide API for debugging/tracking purposevoidsetDataAttribute(String key, Object value) voidsetSearchAttributeBoolean(String key, Boolean value) voidsetSearchAttributeDatetime(String key, String value) voidsetSearchAttributeDouble(String key, Double value) voidsetSearchAttributeInt64(String key, Long value) voidsetSearchAttributeKeyword(String key, String value) voidsetSearchAttributeKeywordArray(String key, List<String> value) voidsetSearchAttributeText(String key, String value) voidsetStateExecutionLocal(String key, Object value) set a local attribute.
-
Constructor Details
-
PersistenceImpl
public PersistenceImpl(DataAttributesRW dataAttributesRW, SearchAttributesRW searchAttributesRW, StateExecutionLocals stateExecutionLocals)
-
-
Method Details
-
getDataAttribute
- Specified by:
getDataAttributein interfaceDataAttributesRW
-
setDataAttribute
- Specified by:
setDataAttributein interfaceDataAttributesRW
-
getSearchAttributeInt64
- Specified by:
getSearchAttributeInt64in interfaceSearchAttributesRW
-
setSearchAttributeInt64
- Specified by:
setSearchAttributeInt64in interfaceSearchAttributesRW
-
getSearchAttributeDouble
- Specified by:
getSearchAttributeDoublein interfaceSearchAttributesRW
-
setSearchAttributeDouble
- Specified by:
setSearchAttributeDoublein interfaceSearchAttributesRW
-
getSearchAttributeBoolean
- Specified by:
getSearchAttributeBooleanin interfaceSearchAttributesRW
-
setSearchAttributeBoolean
- Specified by:
setSearchAttributeBooleanin interfaceSearchAttributesRW
-
getSearchAttributeKeyword
- Specified by:
getSearchAttributeKeywordin interfaceSearchAttributesRW
-
setSearchAttributeKeyword
- Specified by:
setSearchAttributeKeywordin interfaceSearchAttributesRW
-
getSearchAttributeText
- Specified by:
getSearchAttributeTextin interfaceSearchAttributesRW
-
setSearchAttributeText
- Specified by:
setSearchAttributeTextin interfaceSearchAttributesRW
-
getSearchAttributeDatetime
- Specified by:
getSearchAttributeDatetimein interfaceSearchAttributesRW
-
setSearchAttributeDatetime
- Specified by:
setSearchAttributeDatetimein interfaceSearchAttributesRW- Parameters:
key- the search attribute keyvalue- must be timestamp seconds, or in theSearchAttributesRW.DateTimeFormat
-
getSearchAttributeKeywordArray
- Specified by:
getSearchAttributeKeywordArrayin interfaceSearchAttributesRW
-
setSearchAttributeKeywordArray
- Specified by:
setSearchAttributeKeywordArrayin interfaceSearchAttributesRW
-
setStateExecutionLocal
Description copied from interface:StateExecutionLocalsset a local attribute. The scope of the attribute is only within the execution of this state. Usually it's for passing from State Start API to State Decide API User code must make sure using the same type for both get and set- Specified by:
setStateExecutionLocalin interfaceStateExecutionLocals- Parameters:
key- the key of the stateExecutionLocal(scope of the state execution)value- the value
-
getStateExecutionLocal
Description copied from interface:StateExecutionLocalsRetrieve a local state attribute User code must make sure using the same type for both get and set- Specified by:
getStateExecutionLocalin interfaceStateExecutionLocals- Type Parameters:
T- the value type- Parameters:
key- the key of the stateExecutionLocal(scope of the state execution)type- the value type- Returns:
- the value
-
recordEvent
Description copied from interface:StateExecutionLocalsRecord an arbitrary event in State Start/Decide API for debugging/tracking purpose- Specified by:
recordEventin interfaceStateExecutionLocals- Parameters:
key- the key of the event. Within a Start/Decide API, the same key cannot be used for more than once.eventData- the data of the event.
-