use of com.hazelcast.ringbuffer.impl.operations.AddAllOperation in project hazelcast by hazelcast.
the class RingbufferProxy method addAllAsync.
@Override
public CompletionStage<Long> addAllAsync(@Nonnull Collection<? extends E> collection, @Nonnull OverflowPolicy overflowPolicy) {
checkNotNull(collection, "collection can't be null");
checkNotNull(overflowPolicy, "overflowPolicy can't be null");
checkFalse(collection.isEmpty(), "collection can't be empty");
checkTrue(collection.size() <= MAX_BATCH_SIZE, "collection can't be larger than " + MAX_BATCH_SIZE);
Operation op = new AddAllOperation(name, toDataArray(collection), overflowPolicy).setPartitionId(partitionId);
OperationService operationService = getOperationService();
return operationService.createInvocationBuilder(null, op, partitionId).setCallTimeout(Long.MAX_VALUE).invoke();
}
Aggregations