Search in sources :

Example 1 with ReadOneOperation

use of com.hazelcast.ringbuffer.impl.operations.ReadOneOperation in project hazelcast by hazelcast.

the class RingbufferProxy method readOne.

@Override
public E readOne(long sequence) throws InterruptedException {
    checkSequence(sequence);
    Operation op = new ReadOneOperation(name, sequence).setPartitionId(partitionId);
    InvocationFuture<E> f = invokeOnPartition(op);
    try {
        return f.get();
    } catch (Throwable t) {
        throw rethrowAllowInterrupted(t);
    }
}
Also used : OVERWRITE(com.hazelcast.ringbuffer.OverflowPolicy.OVERWRITE) OPERATION_SIZE(com.hazelcast.ringbuffer.impl.operations.GenericOperation.OPERATION_SIZE) SERVICE_NAME(com.hazelcast.ringbuffer.impl.RingbufferService.SERVICE_NAME) ReadOneOperation(com.hazelcast.ringbuffer.impl.operations.ReadOneOperation) AddAllOperation(com.hazelcast.ringbuffer.impl.operations.AddAllOperation) GenericOperation(com.hazelcast.ringbuffer.impl.operations.GenericOperation) ReadOneOperation(com.hazelcast.ringbuffer.impl.operations.ReadOneOperation) ReadManyOperation(com.hazelcast.ringbuffer.impl.operations.ReadManyOperation) Operation(com.hazelcast.spi.impl.operationservice.Operation) AddOperation(com.hazelcast.ringbuffer.impl.operations.AddOperation)

Aggregations

OVERWRITE (com.hazelcast.ringbuffer.OverflowPolicy.OVERWRITE)1 SERVICE_NAME (com.hazelcast.ringbuffer.impl.RingbufferService.SERVICE_NAME)1 AddAllOperation (com.hazelcast.ringbuffer.impl.operations.AddAllOperation)1 AddOperation (com.hazelcast.ringbuffer.impl.operations.AddOperation)1 GenericOperation (com.hazelcast.ringbuffer.impl.operations.GenericOperation)1 OPERATION_SIZE (com.hazelcast.ringbuffer.impl.operations.GenericOperation.OPERATION_SIZE)1 ReadManyOperation (com.hazelcast.ringbuffer.impl.operations.ReadManyOperation)1 ReadOneOperation (com.hazelcast.ringbuffer.impl.operations.ReadOneOperation)1 Operation (com.hazelcast.spi.impl.operationservice.Operation)1