IReliableStateManager.RemoveAsync Method

Definition

Overloads

RemoveAsync(ITransaction, Uri, TimeSpan)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas when the transaction is committed.

RemoveAsync(ITransaction, String, TimeSpan)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas when the transaction is committed.

RemoveAsync(Uri, TimeSpan)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas.

RemoveAsync(String, TimeSpan)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas.

RemoveAsync(Uri)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas.

RemoveAsync(ITransaction, String)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas when the transaction is committed.

RemoveAsync(String)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas.

RemoveAsync(ITransaction, Uri)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas when the transaction is committed.

RemoveAsync(ITransaction, Uri, TimeSpan)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas when the transaction is committed.

public System.Threading.Tasks.Task RemoveAsync (Microsoft.ServiceFabric.Data.ITransaction tx, Uri name, TimeSpan timeout);
abstract member RemoveAsync : Microsoft.ServiceFabric.Data.ITransaction * Uri * TimeSpan -> System.Threading.Tasks.Task
Public Function RemoveAsync (tx As ITransaction, name As Uri, timeout As TimeSpan) As Task

Parameters

tx
ITransaction

Transaction to associate this operation with.

name
Uri

The name of the IReliableState to remove.

timeout
TimeSpan

The amount of time to wait for the operation to complete before throwing a TimeoutException. Primarily used to prevent deadlocks. The default is 4 seconds.

Returns

Task that represents the asynchronous remove operation.

Exceptions

tx is null, or name is null.

An IReliableState with the given name does not exist, or timeout is negative.

The operation failed to complete within the given timeout.

The transaction has been internally faulted by the system. Retry the operation on a new transaction

Thrown when a method call is invalid for the object's current state. Example, transaction used is already terminated: committed or aborted by the user. If this exception is thrown, it is highly likely that there is a bug in the service code of the use of transactions.

Indicates that the Reliable State Manager is closed.

Remarks

This is an atomic operation. The IReliableState will be successfully removed along with all state or be left in-tact. If this method throws an exception, the transaction must be aborted.

RemoveAsync(ITransaction, String, TimeSpan)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas when the transaction is committed.

public System.Threading.Tasks.Task RemoveAsync (Microsoft.ServiceFabric.Data.ITransaction tx, string name, TimeSpan timeout);
abstract member RemoveAsync : Microsoft.ServiceFabric.Data.ITransaction * string * TimeSpan -> System.Threading.Tasks.Task
Public Function RemoveAsync (tx As ITransaction, name As String, timeout As TimeSpan) As Task

Parameters

tx
ITransaction

Transaction to associate this operation with.

name
String

The name of the IReliableState to remove.

timeout
TimeSpan

The amount of time to wait for the operation to complete before throwing a TimeoutException. Primarily used to prevent deadlocks. The default is 4 seconds.

Returns

Task that represents the asynchronous remove operation.

Exceptions

tx is null, or name is null.

An IReliableState with the given name does not exist, or timeout is negative.

The operation failed to complete within the given timeout.

The transaction has been internally faulted by the system. Retry the operation on a new transaction

Thrown when a method call is invalid for the object's current state. Example, transaction used is already terminated: committed or aborted by the user. If this exception is thrown, it is highly likely that there is a bug in the service code of the use of transactions.

Indicates that the Reliable State Manager is closed.

Remarks

This is an atomic operation. The IReliableState will be successfully removed along with all state or be left in-tact. If this method throws an exception, the transaction must be aborted.

RemoveAsync(Uri, TimeSpan)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas.

public System.Threading.Tasks.Task RemoveAsync (Uri name, TimeSpan timeout);
abstract member RemoveAsync : Uri * TimeSpan -> System.Threading.Tasks.Task
Public Function RemoveAsync (name As Uri, timeout As TimeSpan) As Task

Parameters

name
Uri

The name of the IReliableState to remove.

timeout
TimeSpan

The amount of time to wait for the operation to complete before throwing a TimeoutException. Primarily used to prevent deadlocks. The default is 4 seconds.

Returns

Task that represents the asynchronous remove operation.

Exceptions

name is null.

An IReliableState with the given name does not exist, or timeout is negative.

The operation failed to complete within the given timeout.

Indicates that the Reliable State Manager is closed.

The operation has been internally faulted by the system. Retry the operation

Remarks

This is an atomic operation. The IReliableState will be successfully removed along with all state or be left in-tact.

RemoveAsync(String, TimeSpan)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas.

public System.Threading.Tasks.Task RemoveAsync (string name, TimeSpan timeout);
abstract member RemoveAsync : string * TimeSpan -> System.Threading.Tasks.Task
Public Function RemoveAsync (name As String, timeout As TimeSpan) As Task

Parameters

name
String

The name of the IReliableState to remove.

timeout
TimeSpan

The amount of time to wait for the operation to complete before throwing a TimeoutException. Primarily used to prevent deadlocks. The default is 4 seconds.

Returns

Task that represents the asynchronous remove operation.

Exceptions

name is null.

An IReliableState with the given name does not exist, or timeout is negative.

The operation failed to complete within the given timeout.

Indicates that the Reliable State Manager is closed.

The operation has been internally faulted by the system. Retry the operation

Remarks

This is an atomic operation. The IReliableState will be successfully removed along with all state or be left in-tact.

RemoveAsync(Uri)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas.

public System.Threading.Tasks.Task RemoveAsync (Uri name);
abstract member RemoveAsync : Uri -> System.Threading.Tasks.Task
Public Function RemoveAsync (name As Uri) As Task

Parameters

name
Uri

The name of the IReliableState to remove.

Returns

Task that represents the asynchronous remove operation.

Exceptions

name is null.

An IReliableState with the given name does not exist.

The operation failed to complete within the default timeout.

Indicates that the Reliable State Manager is closed.

The operation has been internally faulted by the system. Retry the operation

Remarks

This is an atomic operation. The IReliableState will be successfully removed along with all state or be left in-tact.

RemoveAsync(ITransaction, String)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas when the transaction is committed.

public System.Threading.Tasks.Task RemoveAsync (Microsoft.ServiceFabric.Data.ITransaction tx, string name);
abstract member RemoveAsync : Microsoft.ServiceFabric.Data.ITransaction * string -> System.Threading.Tasks.Task
Public Function RemoveAsync (tx As ITransaction, name As String) As Task

Parameters

tx
ITransaction

Transaction to associate this operation with.

name
String

The name of the IReliableState to remove.

Returns

Task that represents the asynchronous remove operation.

Exceptions

tx is null, or name is null.

An IReliableState with the given name does not exist.

The operation failed to complete within the default timeout.

The transaction has been internally faulted by the system. Retry the operation on a new transaction

Thrown when a method call is invalid for the object's current state. Example, transaction used is already terminated: committed or aborted by the user. If this exception is thrown, it is highly likely that there is a bug in the service code of the use of transactions.

Indicates that the Reliable State Manager is closed.

Remarks

This is an atomic operation. The IReliableState will be successfully removed along with all state or be left in-tact. If this method throws an exception, the transaction must be aborted.

RemoveAsync(String)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas.

public System.Threading.Tasks.Task RemoveAsync (string name);
abstract member RemoveAsync : string -> System.Threading.Tasks.Task
Public Function RemoveAsync (name As String) As Task

Parameters

name
String

The name of the IReliableState to remove.

Returns

Task that represents the asynchronous remove operation.

Exceptions

name is null.

An IReliableState with the given name does not exist.

The operation failed to complete within the default timeout.

Indicates that the Reliable State Manager is closed.

The operation has been internally faulted by the system. Retry the operation

Remarks

This is an atomic operation. The IReliableState will be successfully removed along with all state or be left in-tact.

RemoveAsync(ITransaction, Uri)

Removes the IReliableState with the given name from this state manager. The state is permanently removed from persistent storage and all replicas when the transaction is committed.

public System.Threading.Tasks.Task RemoveAsync (Microsoft.ServiceFabric.Data.ITransaction tx, Uri name);
abstract member RemoveAsync : Microsoft.ServiceFabric.Data.ITransaction * Uri -> System.Threading.Tasks.Task
Public Function RemoveAsync (tx As ITransaction, name As Uri) As Task

Parameters

tx
ITransaction

Transaction to associate this operation with.

name
Uri

The name of the IReliableState to remove.

Returns

Task that represents the asynchronous remove operation.

Exceptions

tx is null, or name is null.

An IReliableState with the given name does not exist.

The operation failed to complete within the default timeout.

The transaction has been internally faulted by the system. Retry the operation on a new transaction

Thrown when a method call is invalid for the object's current state. Example, transaction used is already terminated: committed or aborted by the user. If this exception is thrown, it is highly likely that there is a bug in the service code of the use of transactions.

Indicates that the Reliable State Manager is closed.

Remarks

This is an atomic operation. The IReliableState will be successfully removed along with all state or be left in-tact. If this method throws an exception, the transaction must be aborted.

Applies to