共用方式為


ReliableStateManager Interface

public interface ReliableStateManager

Method Summary

Modifier and Type Method and Description
Transaction createTransaction()

Create and start a new transaction that can be used to group operations to be performed atomically.

AsyncEnumeration<ReliableState> getAsyncEnumerator()

Returns the enumeration of all the reliable states.

<K extends String, V> CompletableFuture<ReliableHashMap<K, V>> getOrAddReliableHashMapAsync(String name)

Returns a reliable HashMap table associated with the given name if it is present. Otherwise creates a new table and returns a reference to it.

<K extends String, V> CompletableFuture<ReliableHashMap<K, V>> getOrAddReliableHashMapAsync(String name, Duration timeout)

Returns a reliable HashMap table associated with the given name if it is present. Otherwise creates a new table and returns a reference to it.

<K extends String, V> CompletableFuture<ReliableHashMap<K, V>> getOrAddReliableHashMapAsync(Transaction tx, String name)

Returns a reliable HashMap table associated with the given name if it is present. Otherwise creates a new table and returns a reference to it.

<K extends String, V> CompletableFuture<ReliableHashMap<K, V>> getOrAddReliableHashMapAsync(Transaction tx, String name, Duration timeout)

Returns a reliable HashMap table associated with the given name if it is present. Otherwise creates a new table and returns a reference to it.

CompletableFuture<?> removeAsync(String name)

Removes the Reliable collection associated with the given name.

CompletableFuture<?> removeAsync(String name, Duration timeout)

Removes the Reliable collection associated with the given name.

CompletableFuture<?> removeAsync(Transaction tx, String name)

Removes the Reliable collection associated with the given name.

CompletableFuture<?> removeAsync(Transaction tx, String name, Duration timeout)

Removes the Reliable collection associated with the given name.

<K extends String, V> CompletableFuture<ConditionalValue<ReliableHashMap<K, V>>> tryGetReliableHashMapAsync(String name)

Gets the reliable hash map associated with the given name.

Method Details

createTransaction

public Transaction createTransaction()

Create and start a new transaction that can be used to group operations to be performed atomically.

Returns:

A reliable Transaction.

getAsyncEnumerator

public AsyncEnumeration getAsyncEnumerator()

Returns the enumeration of all the reliable states.

Returns:

returns the enumeration of all the reliable states.

getOrAddReliableHashMapAsync

public CompletableFuture<>> getOrAddReliableHashMapAsync(String name)

Returns a reliable HashMap table associated with the given name if it is present. Otherwise creates a new table and returns a reference to it.

Parameters:

name - The name of the reliable HashMap table.

Returns:

Returns the handle to reliable HashMap table.

getOrAddReliableHashMapAsync

public CompletableFuture<>> getOrAddReliableHashMapAsync(String name, Duration timeout)

Returns a reliable HashMap table associated with the given name if it is present. Otherwise creates a new table and returns a reference to it.

Parameters:

name - The name of the reliable HashMap table.
timeout - the timeout in seconds to complete the operation.

Returns:

Returns the handle to reliable HashMap table.

getOrAddReliableHashMapAsync

public CompletableFuture<>> getOrAddReliableHashMapAsync(Transaction tx, String name)

Returns a reliable HashMap table associated with the given name if it is present. Otherwise creates a new table and returns a reference to it.

Parameters:

tx - The transaction id associated with this operation.
name - The name of the reliable HashMap table.

Returns:

Returns the handle to reliable HashMap table.

getOrAddReliableHashMapAsync

public CompletableFuture<>> getOrAddReliableHashMapAsync(Transaction tx, String name, Duration timeout)

Returns a reliable HashMap table associated with the given name if it is present. Otherwise creates a new table and returns a reference to it.

Parameters:

tx - The transaction id associated with this operation.
name - The name of the reliable HashMap table.
timeout - the timeout in seconds to complete the operation.

Returns:

Returns the handle to reliable HashMap table.

removeAsync

public CompletableFuture removeAsync(String name)

Removes the Reliable collection associated with the given name.

Parameters:

name - The name of the reliable HashMap table to be removed

Returns:

returns Completable future with a boolean value indicating whether remove succeeded or not.

removeAsync

public CompletableFuture removeAsync(String name, Duration timeout)

Removes the Reliable collection associated with the given name.

Parameters:

name - The name of the reliable HashMap table to be removed
timeout - the timeout in seconds to complete the operation.

Returns:

returns Completable future with a boolean value indicating whether remove succeeded or not.

removeAsync

public CompletableFuture removeAsync(Transaction tx, String name)

Removes the Reliable collection associated with the given name.

Parameters:

tx - The transaction id associated with this operation.
name - The name of the reliable HashMap table to be remove.

Returns:

returns Completable future with a boolean value indicating whether remove succeeded or not.

removeAsync

public CompletableFuture removeAsync(Transaction tx, String name, Duration timeout)

Removes the Reliable collection associated with the given name.

Parameters:

tx - The transaction id associated with this operation.
name - The name of the reliable HashMap table to be removed
timeout - the timeout in seconds to complete the operation.

Returns:

returns Completable future with a boolean value indicating whether remove succeeded or not.

tryGetReliableHashMapAsync

public CompletableFuture<><>>> tryGetReliableHashMapAsync(String name)

Gets the reliable hash map associated with the given name.

Parameters:

name - Name of the reliable hashmap.

Returns:

Returns a conditional value containing the reference to the reliable hashmap with the given name.

Applies to