@Override public Location storeItem(ByteSequence data, byte type, Runnable onComplete) throws IOException { checkClosed(); // Write the packet our internal buffer. int size = data.getLength() + Journal.RECORD_HEAD_SPACE; final Location location = new Location(); location.setSize(size); location.setType(type); Journal.WriteCommand write = new Journal.WriteCommand(location, data, onComplete); enqueueWrite(write); return location; }
@Override public Location storeItem(ByteSequence data, byte type, boolean sync) throws IOException { checkClosed(); // Write the packet our internal buffer. int size = data.getLength() + Journal.RECORD_HEAD_SPACE; final Location location = new Location(); location.setSize(size); location.setType(type); Journal.WriteCommand write = new Journal.WriteCommand(location, data, sync); enqueueWrite(write); if (sync) { writePendingBatch(); } return location; }
@Override public Location storeItem(ByteSequence data, byte type, Runnable onComplete) throws IOException { checkClosed(); // Write the packet our internal buffer. int size = data.getLength() + Journal.RECORD_HEAD_SPACE; final Location location = new Location(); location.setSize(size); location.setType(type); Journal.WriteCommand write = new Journal.WriteCommand(location, data, onComplete); enqueueWrite(write); return location; }
@Override public Location storeItem(ByteSequence data, byte type, Runnable onComplete) throws IOException { checkClosed(); // Write the packet our internal buffer. int size = data.getLength() + Journal.RECORD_HEAD_SPACE; final Location location = new Location(); location.setSize(size); location.setType(type); Journal.WriteCommand write = new Journal.WriteCommand(location, data, onComplete); enqueueWrite(write); return location; }
@Override public Location storeItem(ByteSequence data, byte type, Runnable onComplete) throws IOException { checkClosed(); // Write the packet our internal buffer. int size = data.getLength() + Journal.RECORD_HEAD_SPACE; final Location location = new Location(); location.setSize(size); location.setType(type); Journal.WriteCommand write = new Journal.WriteCommand(location, data, onComplete); enqueueWrite(write); return location; }
@Override public Location storeItem(ByteSequence data, byte type, boolean sync) throws IOException { checkClosed(); // Write the packet our internal buffer. int size = data.getLength() + Journal.RECORD_HEAD_SPACE; final Location location = new Location(); location.setSize(size); location.setType(type); Journal.WriteCommand write = new Journal.WriteCommand(location, data, sync); enqueueWrite(write); if (sync) { writePendingBatch(); } return location; }
@Override public Location storeItem(ByteSequence data, byte type, boolean sync) throws IOException { checkClosed(); // Write the packet our internal buffer. int size = data.getLength() + Journal.RECORD_HEAD_SPACE; final Location location = new Location(); location.setSize(size); location.setType(type); Journal.WriteCommand write = new Journal.WriteCommand(location, data, sync); enqueueWrite(write); if (sync) { writePendingBatch(); } return location; }
@Override public Location storeItem(ByteSequence data, byte type, boolean sync) throws IOException { checkClosed(); // Write the packet our internal buffer. int size = data.getLength() + Journal.RECORD_HEAD_SPACE; final Location location = new Location(); location.setSize(size); location.setType(type); Journal.WriteCommand write = new Journal.WriteCommand(location, data, sync); enqueueWrite(write); if (sync) { writePendingBatch(); } return location; }