AerospikeClientTruncate Method

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).

Definition

Namespace: Aerospike.Client
Assembly: AerospikeClient (in AerospikeClient.dll) Version: 7.0.1
C#
public void Truncate(
	InfoPolicy policy,
	string ns,
	string set,
	DateTime? beforeLastUpdate
)

Parameters

policy  InfoPolicy
info command configuration parameters, pass in null for defaults
ns  String
required namespace
set  String
optional set name. Pass in null to delete all sets in namespace.
beforeLastUpdate  NullableDateTime
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