Class DcrStorage
java.lang.Object
org.gridgain.internal.dcr.metastorage.DcrStorage
Replication storage based on metastorage
MetaStorageManager.-
Constructor Summary
ConstructorsConstructorDescriptionDcrStorage(org.apache.ignite.internal.metastorage.MetaStorageManager manager) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionfindByNode(String nodeName) Find all replications by worker node.Returns stored replication options by provided identifier.getAll()Returns all stored replication entries.put(String name, ReplicationEntry entry) Persists replication to storage.org.gridgain.internal.lang.DisposableregisterStoreListener(DcrStorageListener listener) Registers storage listener.Removes replication from storage.remove(String name, Predicate<ReplicationEntry> checker) Removes replication from storage if it satisfies the supplied predicate.update(String name, Function<ReplicationEntry, ReplicationEntry> func, boolean withRetry) Update entry.
-
Constructor Details
-
DcrStorage
public DcrStorage(org.apache.ignite.internal.metastorage.MetaStorageManager manager) Constructor.- Parameters:
manager- Meta storage manager.
-
-
Method Details
-
registerStoreListener
Registers storage listener.- Parameters:
listener- Store listener to register.
-
put
Persists replication to storage.- Parameters:
name- Replication name.entry- Replication options.- Returns:
- Future with
trueresult if status updated successfully.
-
findByNode
Find all replications by worker node.- Parameters:
nodeName- Worker node name.- Returns:
- Future with list of replications which hosted on provided node.
-
get
Returns stored replication options by provided identifier.- Parameters:
name- Replication name.- Returns:
- Future with options result or
nullin case when replication with provided identifier doesn't exist.
-
getAll
Returns all stored replication entries.- Returns:
- Future with list of replication entries.
-
remove
Removes replication from storage.- Parameters:
name- Replication name.- Returns:
- Future with
trueresult if status updated successfully.
-
remove
Removes replication from storage if it satisfies the supplied predicate.- Parameters:
name- Replication name.checker- Predicate to apply to the replication to determine if it should be deleted.- Returns:
- Future with
trueresult if status updated successfully.
-
update
public CompletableFuture<Boolean> update(String name, Function<ReplicationEntry, ReplicationEntry> func, boolean withRetry) Update entry.- Parameters:
name- Replication name.func- Update function.- Returns:
- Future with
trueresult if status updated successfully.
-