Class ImmediateStorageStrategy
java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.strategy.PointStorageStrategy
com.inductiveautomation.historian.gateway.api.storage.strategy.ImmediateStorageStrategy
A singleton
PointStorageStrategy that stores atomic, complex and change points
immediately and synchronously through the supplied storage functions, returning completed CompletionStages. It keeps no state and does nothing on flush or shutdown.-
Nested Class Summary
Nested classes/interfaces inherited from class PointStorageStrategy
PointStorageStrategy.Listener -
Field Summary
Fields inherited from class PointStorageStrategy
SHUTDOWN_FAILURE_CODE, UNHANDLED_FAILURE_CODE -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmediateStorageStrategyprocessAtomic(List<AtomicPoint<?>> atomicPoints) Processes atomic points asynchronously.<C extends ChangePoint<?>>
CompletionStage<StorageResult<C>> processChanges(List<C> changePoints) Processes change points asynchronously.<C extends ComplexPoint<?>>
CompletionStage<StorageResult<C>> processComplex(List<C> complexPoints) Processes complex points asynchronously.voidResumes processing afterPointStorageStrategy.pauseProcessing()orPointStorageStrategy.stopProcessing().voidRejects further work, waits up to 5 seconds for the forwarder to finish, then fails anything still queued.Methods inherited from class PointStorageStrategy
completeAsFailure, failureWithError, flushNow, flushTelemetry, forwardPoints, joinSubBatchResults, metrics, onPointsReady, pauseProcessing
-
Method Details
-
create
-
processAtomic
public CompletionStage<StorageResult<AtomicPoint<?>>> processAtomic(List<AtomicPoint<?>> atomicPoints) Description copied from class:PointStorageStrategyProcesses atomic points asynchronously.- Specified by:
processAtomicin classPointStorageStrategy- Parameters:
atomicPoints- the points to process.- Returns:
- a stage completing with the storage result.
-
processComplex
public <C extends ComplexPoint<?>> CompletionStage<StorageResult<C>> processComplex(List<C> complexPoints) Description copied from class:PointStorageStrategyProcesses complex points asynchronously.- Specified by:
processComplexin classPointStorageStrategy- Type Parameters:
C- the complex point type.- Parameters:
complexPoints- the points to process.- Returns:
- a stage completing with the storage result.
-
processChanges
public <C extends ChangePoint<?>> CompletionStage<StorageResult<C>> processChanges(List<C> changePoints) Description copied from class:PointStorageStrategyProcesses change points asynchronously.- Specified by:
processChangesin classPointStorageStrategy- Type Parameters:
C- the change point type.- Parameters:
changePoints- the points to process.- Returns:
- a stage completing with the storage result.
-
resumeProcessing
public void resumeProcessing()Description copied from class:PointStorageStrategyResumes processing afterPointStorageStrategy.pauseProcessing()orPointStorageStrategy.stopProcessing().- Specified by:
resumeProcessingin classPointStorageStrategy
-
stopProcessing
public void stopProcessing()Rejects further work, waits up to 5 seconds for the forwarder to finish, then fails anything still queued. Queued batches are completed rather than dropped, because their callers block onbatch.result().- Specified by:
stopProcessingin classPointStorageStrategy
-