use of com.hazelcast.ringbuffer.impl.RingbufferContainer in project hazelcast by hazelcast.
the class AddAllBackupOperation method run.
@Override
public void run() throws Exception {
final RingbufferContainer ringbuffer = getRingBufferContainer();
final long firstSequenceId = lastSequenceId - items.length + 1;
for (int i = 0; i < items.length; i++) {
ringbuffer.set(firstSequenceId + i, items[i]);
}
}
use of com.hazelcast.ringbuffer.impl.RingbufferContainer in project hazelcast by hazelcast.
the class AddAllOperation method run.
@Override
public void run() throws Exception {
final RingbufferContainer ringbuffer = getRingBufferContainer();
if (overflowPolicy == FAIL) {
if (ringbuffer.remainingCapacity() < items.length) {
lastSequence = -1;
return;
}
}
lastSequence = ringbuffer.addAll(items);
}
use of com.hazelcast.ringbuffer.impl.RingbufferContainer in project hazelcast by hazelcast.
the class ReplicationOperation method writeInternal.
@Override
protected void writeInternal(ObjectDataOutput out) throws IOException {
out.writeInt(migrationData.size());
for (Map.Entry<String, RingbufferContainer> entry : migrationData.entrySet()) {
String ringbufferName = entry.getKey();
out.writeUTF(ringbufferName);
RingbufferContainer container = entry.getValue();
container.writeData(out);
}
}
Aggregations