Interface StoreAndForwardManager
public interface StoreAndForwardManager
The main manager interface for handling all store and forward operations.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<EngineInformation>
getEngineInformation
(String engineId) Gets descriptiveEngineInformation
about the specified engine that is registered with this manager.getEngineInformation
(String engineId, boolean includeQuarantinedInfo) Gets descriptiveEngineInformation
about the specified engine that is registered with this manager.getQuarantineInterface
(String engineId) Gets an Optional of theQuarantineInterface
that is associated with an engine if supported.<T extends PersistentData>
List<String>getSupportedEngines
(PersistentFlavor<T> flavor) Gets a list of all engine ids that accept data for the specified flavor.lookupFlavor
(String flavorSignature) Looks up the registered matchingPersistentFlavor
within this manager as determined by the specified flavor signature.<T extends PersistentData>
voidregisterDataFlavor
(PersistentFlavor<T> flavor) Registers a new data flavor with the manager.default <T extends PersistentData>
voidregisterSink
(DataSink<T> sink) Registers aDataSink
with the specified store and forward engine.<T extends PersistentData>
voidregisterSink
(DataSink<T> sink, boolean createEngine) Registers aDataSink
with the specified store and forward engine.<T extends PersistentData>
voidstoreData
(PersistentDataBundle<T> dataBundle) Stores thePersistentDataBundle
against the specified store and forward engine as indicated within the data's storage id.default <T extends PersistentData>
voidStores list ofPersistentData
to the specified store and forward engine.default <T extends PersistentData>
voidStores singlePersistentData
to the store and forward engine.<T extends PersistentData>
voidunregisterDataFlavor
(PersistentFlavor<T> flavor) Unregisters a data flavor with the manager.<T extends PersistentData>
voidunregisterSink
(DataSink<T> sink) Unregisters aDataSink
from the specified store and forward engine.<T extends PersistentData>
voidunregisterSink
(StorageId identifier, PersistentFlavor<T> flavor) Unregisters aDataSink
, belonging to the specifiedPersistentFlavor
, from the specified store and forward system.
-
Method Details
-
registerSink
Registers aDataSink
with the specified store and forward engine. A standard engine will be created if one doesn't already exist.- Parameters:
sink
- the sink to register
-
registerSink
Registers aDataSink
with the specified store and forward engine.
Depending on the implementation, a sink can be temporarily cached within the manager if the engine doesn't exist and thecreateEngine
flag is false. This allows for the sink to be registered with the engine at a later time once it's created.- Parameters:
sink
- the sink to registercreateEngine
- if true, creates a new engine if one does not already exist
-
unregisterSink
Unregisters aDataSink
from the specified store and forward engine.- Parameters:
sink
- the sink to unregister
-
unregisterSink
Unregisters aDataSink
, belonging to the specifiedPersistentFlavor
, from the specified store and forward system.- Parameters:
identifier
- the identifier associated with the data sinkflavor
- the flavor belonging to the desired (unregistered) sink's supported flavor
-
registerDataFlavor
Registers a new data flavor with the manager. This can allow for future lookups when attempting to deserialize data when only the flavor key is known.- Parameters:
flavor
- The persistent flavor to register.
-
unregisterDataFlavor
Unregisters a data flavor with the manager.- Parameters:
flavor
- The persistent flavor to unregister.
-
lookupFlavor
Looks up the registered matchingPersistentFlavor
within this manager as determined by the specified flavor signature.- Parameters:
flavorSignature
- the flavor signature to use for the lookup- Returns:
- An optional
PersistentFlavor
, or empty if no flavor was found.
-
storeData
Stores singlePersistentData
to the store and forward engine.- Parameters:
identifier
- the identifier to be used for determining where to store the datadata
- the data to store- Throws:
Exception
- if an error occurs while storing the data
-
storeData
default <T extends PersistentData> void storeData(StorageId identifier, List<T> data) throws Exception Stores list ofPersistentData
to the specified store and forward engine.- Parameters:
identifier
- the identifier to be used for determining where to store the datadata
- the list of data to store- Throws:
Exception
- if an error occurs while storing the data
-
storeData
Stores thePersistentDataBundle
against the specified store and forward engine as indicated within the data's storage id.- Parameters:
dataBundle
- the data to store against the desired store and forward engine- Throws:
Exception
- if an error occurs while storing the data
-
getSupportedEngines
Gets a list of all engine ids that accept data for the specified flavor. If the flavor is null, then all ids for registered engines will be returned.- Parameters:
flavor
- the flavor to search for, nullable- Returns:
- a list of all engines can accept data for the specified flavor
-
getEngineInformation
Gets descriptiveEngineInformation
about the specified engine that is registered with this manager. If the engine supports quarantining data, then quarantined info will be included with the engine info.- Parameters:
engineId
- the id of the engine to get information for- Returns:
- an optional containing the engine information if it exists
-
getEngineInformation
Gets descriptiveEngineInformation
about the specified engine that is registered with this manager. Quarantined data info will only be included if the specific istrue
.- Parameters:
engineId
- the id of the engine to get information forincludeQuarantinedInfo
- ifQuarantinedDataInfo
results should be included- Returns:
- an optional containing the engine information if it exists
-
getQuarantineInterface
Gets an Optional of theQuarantineInterface
that is associated with an engine if supported. An empty Optional will be returned if the interface doesn't exist, or unsupported by the engine.- Parameters:
engineId
- the engine id that supports quarantining capability- Returns:
- an optional containing the QuarantineInterface if it exists
-