public void SetBatchExists(Policy policy, Key[] keys, BatchNode.BatchNamespace batch) { // Estimate buffer size Begin(); int byteSize = batch.offsetsSize * SyncCommand.DIGEST_SIZE; dataOffset += ByteUtil.EstimateSizeUtf8(batch.ns) + FIELD_HEADER_SIZE + byteSize + FIELD_HEADER_SIZE; SizeBuffer(); WriteHeader(policy, Command.INFO1_READ | Command.INFO1_NOBINDATA, 0, 2, 0); WriteField(batch.ns, FieldType.NAMESPACE); WriteFieldHeader(byteSize, FieldType.DIGEST_RIPE_ARRAY); int[] offsets = batch.offsets; int max = batch.offsetsSize; for (int i = 0; i < max; i++) { Key key = keys[offsets[i]]; byte[] digest = key.digest; Array.Copy(digest, 0, dataBuffer, dataOffset, digest.Length); dataOffset += digest.Length; } End(); }
public AsyncBatchGetSequenceDirect(AsyncBatchGetSequenceDirect other) : base(other) { this.batch = other.batch; this.keys = other.keys; this.binNames = other.binNames; this.listener = other.listener; this.readAttr = other.readAttr; }
public AsyncBatchGetArrayDirect(AsyncBatchGetArrayDirect other) : base(other) { this.batch = other.batch; this.keys = other.keys; this.binNames = other.binNames; this.records = other.records; this.readAttr = other.readAttr; }
public BatchExistsArrayDirect ( BatchNode.BatchNamespace batch, Policy policy, Key[] keys, bool[] existsArray ) : base(false) { this.batch = batch; this.policy = policy; this.keys = keys; this.existsArray = existsArray; }
public BatchCommandExists ( Node node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, bool[] existsArray ) : base(node) { this.batch = batch; this.policy = policy; this.keys = keys; this.existsArray = existsArray; }
public AsyncBatchExistsSequenceDirect ( AsyncMultiExecutor parent, AsyncCluster cluster, AsyncNode node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, ExistsSequenceListener listener ) : base(parent, cluster, policy, node, false) { this.batch = batch; this.keys = keys; this.listener = listener; }
public AsyncBatchExistsArrayDirect ( AsyncMultiExecutor parent, AsyncCluster cluster, AsyncNode node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, bool[] existsArray ) : base(parent, cluster, policy, node, false) { this.batch = batch; this.keys = keys; this.existsArray = existsArray; }
public BatchGetArrayDirect ( BatchNode.BatchNamespace batch, Policy policy, Key[] keys, string[] binNames, Record[] records, int readAttr ) : base(false) { this.batch = batch; this.policy = policy; this.keys = keys; this.binNames = binNames; this.records = records; this.readAttr = readAttr; }
public BatchCommandGet ( Node node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, HashSet <string> binNames, Record[] records, int readAttr ) : base(node) { this.batch = batch; this.policy = policy; this.keys = keys; this.binNames = binNames; this.records = records; this.readAttr = readAttr; }
public void SetBatchReadDirect(Policy policy, Key[] keys, BatchNode.BatchNamespace batch, string[] binNames, int readAttr) { // Estimate buffer size Begin(); int byteSize = batch.offsetsSize * SyncCommand.DIGEST_SIZE; dataOffset += ByteUtil.EstimateSizeUtf8(batch.ns) + FIELD_HEADER_SIZE + byteSize + FIELD_HEADER_SIZE; if (binNames != null) { foreach (string binName in binNames) { EstimateOperationSize(binName); } } SizeBuffer(); int operationCount = (binNames == null)? 0 : binNames.Length; WriteHeader(policy, readAttr, 0, 2, operationCount); WriteField(batch.ns, FieldType.NAMESPACE); WriteFieldHeader(byteSize, FieldType.DIGEST_RIPE_ARRAY); int[] offsets = batch.offsets; int max = batch.offsetsSize; for (int i = 0; i < max; i++) { Key key = keys[offsets[i]]; byte[] digest = key.digest; Array.Copy(digest, 0, dataBuffer, dataOffset, digest.Length); dataOffset += digest.Length; } if (binNames != null) { foreach (string binName in binNames) { WriteOperation(binName, Operation.Type.READ); } } End(); }
public AsyncBatchGetSequence ( AsyncMultiExecutor parent, AsyncCluster cluster, AsyncNode node, BatchNode.BatchNamespace batchNamespace, Policy policy, Key[] keys, HashSet <string> binNames, RecordSequenceListener listener, int readAttr ) : base(parent, cluster, node, false, binNames) { this.batchNamespace = batchNamespace; this.policy = policy; this.keys = keys; this.listener = listener; this.readAttr = readAttr; }
public AsyncBatchGetSequenceDirect ( AsyncMultiExecutor parent, AsyncCluster cluster, AsyncNode node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, string[] binNames, RecordSequenceListener listener, int readAttr ) : base(parent, cluster, policy, node, false) { this.batch = batch; this.keys = keys; this.binNames = binNames; this.listener = listener; this.readAttr = readAttr; }
public AsyncBatchGetArray ( AsyncMultiExecutor parent, AsyncCluster cluster, AsyncNode node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, HashSet <string> binNames, Record[] records, int readAttr ) : base(parent, cluster, node, false, binNames) { this.batch = batch; this.policy = policy; this.keys = keys; this.records = records; this.readAttr = readAttr; }
public AsyncBatchExistsSequenceDirect( AsyncMultiExecutor parent, AsyncCluster cluster, AsyncNode node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, ExistsSequenceListener listener ) : base(parent, cluster, node, false) { this.batch = batch; this.policy = policy; this.keys = keys; this.listener = listener; }
public AsyncBatchGetSequenceDirect( AsyncMultiExecutor parent, AsyncCluster cluster, AsyncNode node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, string[] binNames, RecordSequenceListener listener, int readAttr ) : base(parent, cluster, node, false) { this.batch = batch; this.policy = policy; this.keys = keys; this.binNames = binNames; this.listener = listener; this.readAttr = readAttr; }
public AsyncBatchExistsArrayDirect( AsyncMultiExecutor parent, AsyncCluster cluster, AsyncNode node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, bool[] existsArray ) : base(parent, cluster, node, false) { this.batch = batch; this.policy = policy; this.keys = keys; this.existsArray = existsArray; }
public BatchExistsArrayDirect( Node node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, bool[] existsArray ) : base(node, false) { this.batch = batch; this.policy = policy; this.keys = keys; this.existsArray = existsArray; }
public AsyncBatchExistsSequenceDirect(AsyncBatchExistsSequenceDirect other) : base(other) { this.batch = other.batch; this.keys = other.keys; this.listener = other.listener; }
public BatchGetArrayDirect( Node node, BatchNode.BatchNamespace batch, Policy policy, Key[] keys, string[] binNames, Record[] records, int readAttr ) : base(node, false) { this.batch = batch; this.policy = policy; this.keys = keys; this.binNames = binNames; this.records = records; this.readAttr = readAttr; }
public AsyncBatchExistsArrayDirect(AsyncBatchExistsArrayDirect other) : base(other) { this.batch = other.batch; this.keys = other.keys; this.existsArray = other.existsArray; }