IReliableStateManager.RemoveAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
Thrown when the IReliableStateManager is not in Primary.
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
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.
Thrown when the IReliableStateManager is not in Primary.
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
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.
Thrown when the IReliableStateManager is not in Primary.
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.
Applies to
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.
Thrown when the IReliableStateManager is not in Primary.
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.
Applies to
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.
Thrown when the IReliableStateManager is not in Primary.
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.
Applies to
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.
Thrown when the IReliableStateManager is not in Primary.
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
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.
Thrown when the IReliableStateManager is not in Primary.
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.
Applies to
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.
Thrown when the IReliableStateManager is not in Primary.
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.