Class PointStorageStrategy
java.lang.Object
com.inductiveautomation.historian.gateway.api.storage.strategy.PointStorageStrategy
- Direct Known Subclasses:
DebounceStorageStrategy,ImmediateStorageStrategy
Abstract class representing a strategy for storing points in a historian system. This class
provides methods for processing different types of points and managing the lifecycle of the
storage strategy.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceListener interface for handling batches of temporal points when they are ready. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final QualityCodeQualityCode indicating a failure due to shutdown. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidforwardPoints(TemporalPointBatch<?> batch) Forwards a batch of temporal points to the registered listener, if one exists.final voidonPointsReady(PointStorageStrategy.Listener pointsConsumer) Registers a listener to handle batches of temporal points when they are ready.abstract CompletionStage<StorageResult<AtomicPoint<?>>>processAtomic(List<AtomicPoint<?>> atomicPoints) Processes a list of atomic points asynchronously.abstract <C extends ChangePoint<?>>
CompletionStage<StorageResult<C>>processChanges(List<C> changePoints) Processes a list of change points asynchronously.abstract <C extends ComplexPoint<?>>
CompletionStage<StorageResult<C>>processComplex(List<C> complexPoints) Processes a list of complex points asynchronously.abstract voidshutdown()Shuts down the storage strategy, preventing further processing of points.
-
Field Details
-
SHUTDOWN_FAILURE_CODE
QualityCode indicating a failure due to shutdown. No more points will be accepted once this code is triggered.
-
-
Constructor Details
-
PointStorageStrategy
public PointStorageStrategy()
-
-
Method Details
-
processAtomic
public abstract CompletionStage<StorageResult<AtomicPoint<?>>> processAtomic(List<AtomicPoint<?>> atomicPoints) Processes a list of atomic points asynchronously.- Parameters:
atomicPoints- The list of atomic points to process.- Returns:
- A CompletionStage representing the result of the storage operation.
-
processComplex
public abstract <C extends ComplexPoint<?>> CompletionStage<StorageResult<C>> processComplex(List<C> complexPoints) Processes a list of complex points asynchronously.- Type Parameters:
C- The type of complex points.- Parameters:
complexPoints- The list of complex points to process.- Returns:
- A CompletionStage representing the result of the storage operation.
-
processChanges
public abstract <C extends ChangePoint<?>> CompletionStage<StorageResult<C>> processChanges(List<C> changePoints) Processes a list of change points asynchronously.- Type Parameters:
C- The type of change points.- Parameters:
changePoints- The list of change points to process.- Returns:
- A CompletionStage representing the result of the storage operation.
-
shutdown
public abstract void shutdown()Shuts down the storage strategy, preventing further processing of points. -
forwardPoints
Forwards a batch of temporal points to the registered listener, if one exists.- Parameters:
batch- The batch of temporal points to forward.
-
onPointsReady
Registers a listener to handle batches of temporal points when they are ready.- Parameters:
pointsConsumer- The listener to register.
-