Remove records in specified namespace/set efficiently. This method is many orders of magnitude
faster than deleting records one at a time.
See https://www.aerospike.com/docs/reference/info#truncate
This asynchronous server call may return before the truncation is complete. The user can still write new records after the server returns because new records will have last update times greater than the truncate cutoff (set at the time of truncate call).
Namespace: Aerospike.Client
Assembly: AerospikeClient (in AerospikeClient.dll) Version: 5.1.1.0 (5.1.1)
Syntax
C#
public void Truncate( InfoPolicy policy, string ns, string set, DateTime? beforeLastUpdate )
Parameters
- policy
- Type: Aerospike.ClientInfoPolicy
info command configuration parameters, pass in null for defaults - ns
- Type: SystemString
required namespace - set
- Type: SystemString
optional set name. Pass in null to delete all sets in namespace. - beforeLastUpdate
- Type: SystemNullableDateTime
optionally delete records before record last update time. If specified, value must be before the current time. Pass in null to delete all records in namespace/set regardless of last update time.
Implements
IAerospikeClientTruncate(InfoPolicy, String, String, NullableDateTime)See Also