use of com.hazelcast.ringbuffer.impl.operations.AddOperation in project hazelcast by hazelcast.
the class RingbufferProxy method add.
@Override
public long add(E item) {
checkNotNull(item, "item can't be null");
Operation op = new AddOperation(name, toData(item), OVERWRITE).setPartitionId(partitionId);
InternalCompletableFuture<Long> f = invokeOnPartition(op);
return f.join();
}
use of com.hazelcast.ringbuffer.impl.operations.AddOperation in project hazelcast by hazelcast.
the class RingbufferProxy method addAsync.
@Override
public ICompletableFuture<Long> addAsync(E item, OverflowPolicy overflowPolicy) {
checkNotNull(item, "item can't be null");
checkNotNull(overflowPolicy, "overflowPolicy can't be null");
Operation op = new AddOperation(name, toData(item), overflowPolicy).setPartitionId(partitionId);
return invokeOnPartition(op);
}
Aggregations