Package io.axway.iron.spi.storage
Interface SnapshotStore
-
public interface SnapshotStore
SPI for snapshot store.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SnapshotStore.SnapshotStoreWriter
static interface
SnapshotStore.StoreSnapshotReader
A reader to access the content of a snapshot for a store
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
Dispose any resource the store may have open.org.reactivestreams.Publisher<SnapshotStore.StoreSnapshotReader>
createSnapshotReader(java.math.BigInteger transactionId)
Retrieve an existing snapshot in the store.SnapshotStore.SnapshotStoreWriter
createSnapshotWriter(java.math.BigInteger transactionId)
Initiate the storage part of a snapshot for a given store.void
deleteSnapshot(java.math.BigInteger transactionId)
Delete a snapshot.java.util.List<java.math.BigInteger>
listSnapshots()
List all the existing snapshots.
-
-
-
Method Detail
-
createSnapshotWriter
SnapshotStore.SnapshotStoreWriter createSnapshotWriter(java.math.BigInteger transactionId)
Initiate the storage part of a snapshot for a given store. In the end one snapshot will contain parts for every stores, so this method is called once for each store at snapshot time.- Parameters:
transactionId
- the transaction id of the snapshot to be written.- Returns:
- the
SnapshotStoreWriter
to be used to write the store's snapshot content.
-
createSnapshotReader
org.reactivestreams.Publisher<SnapshotStore.StoreSnapshotReader> createSnapshotReader(java.math.BigInteger transactionId) throws java.io.IOException
Retrieve an existing snapshot in the store.- Parameters:
transactionId
- the transaction id of the snapshot to be retrieved- Returns:
- the
Publisher<StoreSnapshotReader>
to be used to read the snapshot content. The publisher will provide oneSnapshotStore.StoreSnapshotReader
by store in the snapshot. - Throws:
java.io.IOException
- in case of error when trying to provide access to the one of the stores snapshots.
-
listSnapshots
java.util.List<java.math.BigInteger> listSnapshots() throws java.io.IOException
List all the existing snapshots.- Returns:
- the list of snapshot transactions id.
- Throws:
java.io.IOException
- if an I/O error occurs when listing the snapshots
-
close
default void close()
Dispose any resource the store may have open.
-
deleteSnapshot
void deleteSnapshot(java.math.BigInteger transactionId) throws java.io.IOException
Delete a snapshot.- Parameters:
transactionId
- the transaction id of the snapshot to be deleted.- Throws:
java.io.IOException
- if an I/O error occurs when deleting the snapshot
-
-