Aerospike.Database.LINQPadDriver.Extensions Namespace
Aerospike LINDPad Driver

SetRecords..::..Import Method

Imports a Export(String, Exp, Boolean) generated JSON file based on JsonExportStructure.

Namespace:  Aerospike.Database.LINQPadDriver.Extensions
Assembly:  Aerospike.Database.LINQPadDriver (in Aerospike.Database.LINQPadDriver.dll)

Syntax


public int Import(
	string importJSONFile,
	WritePolicy writePolicy,
	Nullable<TimeSpan> ttl,
	bool useImportRecTTL,
	int maxDegreeOfParallelism,
	BatchPolicy batchPolicy,
	BatchWritePolicy batchWritePolicy,
	bool useParallelPuts,
	CancellationToken cancellationToken
)

Parameters

importJSONFile
Type: String
The JSON file that will be read
writePolicy
Type: WritePolicy
The write policy. If not provided , the default policy is used.
ttl
Type: Nullable<(Of <(<'TimeSpan>)>)>
Time-to-live of the records being imported Note: This is only used, if useImportRecTTL is false. Also, The expiration()()()() property is overwritten with this value after a copy is made of the policy instance. TTLExpiration
useImportRecTTL
Type: Boolean
If true, the TTL of the record at export is used. Otherwise, ttl is used, if provided. Note: If true batchPolicy and batchWritePolicy are ignored since batch writes cannot be performed.
maxDegreeOfParallelism
Type: Int32
The maximum degree of parallelism. MaxDegreeOfParallelism
batchPolicy
Type: BatchPolicy
BatchPolicy
batchWritePolicy
Type: BatchWritePolicy
BatchWritePolicy
useParallelPuts
Type: Boolean
If true, Parallel Put actions are used based on maxDegreeOfParallelism is used instead of batch writes.
cancellationToken
Type: CancellationToken
The CancellationToken associated with this ParallelOptions instance.

Return Value

The number of records imported

Exceptions


ExceptionCondition
InvalidOperationExceptionThrown if the cluster is a production cluster. Can disable this by going into the connection properties.