Search in sources :

Example 1 with GenericOperation

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

the class RingbufferProxy method size.

@Override
public long size() {
    Operation op = new GenericOperation(name, OPERATION_SIZE).setPartitionId(partitionId);
    InternalCompletableFuture<Long> f = invokeOnPartition(op);
    return f.join();
}
Also used : GenericOperation(com.hazelcast.ringbuffer.impl.operations.GenericOperation) 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) AddOperation(com.hazelcast.ringbuffer.impl.operations.AddOperation) Operation(com.hazelcast.spi.Operation)

Example 2 with GenericOperation

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

the class RingbufferProxy method tailSequence.

@Override
public long tailSequence() {
    Operation op = new GenericOperation(name, OPERATION_TAIL).setPartitionId(partitionId);
    InternalCompletableFuture<Long> f = invokeOnPartition(op);
    return f.join();
}
Also used : GenericOperation(com.hazelcast.ringbuffer.impl.operations.GenericOperation) 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) AddOperation(com.hazelcast.ringbuffer.impl.operations.AddOperation) Operation(com.hazelcast.spi.Operation)

Example 3 with GenericOperation

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

the class RingbufferProxy method remainingCapacity.

@Override
public long remainingCapacity() {
    // capacity will always be equal to the capacity.
    if (config.getTimeToLiveSeconds() == 0) {
        return config.getCapacity();
    }
    Operation op = new GenericOperation(name, OPERATION_REMAINING_CAPACITY).setPartitionId(partitionId);
    InternalCompletableFuture<Long> f = invokeOnPartition(op);
    return f.join();
}
Also used : GenericOperation(com.hazelcast.ringbuffer.impl.operations.GenericOperation) 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) AddOperation(com.hazelcast.ringbuffer.impl.operations.AddOperation) Operation(com.hazelcast.spi.Operation)

Example 4 with GenericOperation

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

the class RingbufferProxy method headSequence.

@Override
public long headSequence() {
    Operation op = new GenericOperation(name, OPERATION_HEAD).setPartitionId(partitionId);
    InternalCompletableFuture<Long> f = invokeOnPartition(op);
    return f.join();
}
Also used : GenericOperation(com.hazelcast.ringbuffer.impl.operations.GenericOperation) 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) AddOperation(com.hazelcast.ringbuffer.impl.operations.AddOperation) Operation(com.hazelcast.spi.Operation)

Aggregations

AddAllOperation (com.hazelcast.ringbuffer.impl.operations.AddAllOperation)4 AddOperation (com.hazelcast.ringbuffer.impl.operations.AddOperation)4 GenericOperation (com.hazelcast.ringbuffer.impl.operations.GenericOperation)4 ReadManyOperation (com.hazelcast.ringbuffer.impl.operations.ReadManyOperation)4 ReadOneOperation (com.hazelcast.ringbuffer.impl.operations.ReadOneOperation)4 Operation (com.hazelcast.spi.Operation)4