public Value addFirst(Transaction tx, Key key, Value value) throws IOException { if (key == null) { throw new IllegalArgumentException("Key cannot be null"); } entries.addFirst(new KeyValueEntry<Key, Value>(key, value)); store(tx, ADD_FIRST); return null; }
public Value put(Transaction tx, Key key, Value value) throws IOException { if (key == null) { throw new IllegalArgumentException("Key cannot be null"); } entries.addLast(new KeyValueEntry<Key, Value>(key, value)); store(tx, ADD_LAST); return null; }
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public ListNode<Key, Value> readPayload(DataInput is) throws IOException { ListNode<Key, Value> node = new ListNode<Key, Value>(); node.setNext(is.readLong()); final short size = is.readShort(); for (short i = 0; i < size; i++) { node.entries.addLast(new KeyValueEntry(keyMarshaller.readPayload(is), valueMarshaller.readPayload(is))); } return node; } }
public Value addFirst(Transaction tx, Key key, Value value) throws IOException { if (key == null) { throw new IllegalArgumentException("Key cannot be null"); } entries.addFirst(new KeyValueEntry<Key, Value>(key, value)); store(tx, ADD_FIRST); return null; }
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public ListNode<Key, Value> readPayload(DataInput is) throws IOException { ListNode<Key, Value> node = new ListNode<Key, Value>(); node.setNext(is.readLong()); final short size = is.readShort(); for (short i = 0; i < size; i++) { node.entries.addLast(new KeyValueEntry(keyMarshaller.readPayload(is), valueMarshaller.readPayload(is))); } return node; } }
public Value put(Transaction tx, Key key, Value value) throws IOException { if (key == null) { throw new IllegalArgumentException("Key cannot be null"); } entries.addLast(new KeyValueEntry<Key, Value>(key, value)); store(tx, ADD_LAST); return null; }
public Value addFirst(Transaction tx, Key key, Value value) throws IOException { if (key == null) { throw new IllegalArgumentException("Key cannot be null"); } entries.addFirst(new KeyValueEntry<Key, Value>(key, value)); store(tx, ADD_FIRST); return null; }
public Value put(Transaction tx, Key key, Value value) throws IOException { if (key == null) { throw new IllegalArgumentException("Key cannot be null"); } entries.addLast(new KeyValueEntry<Key, Value>(key, value)); store(tx, ADD_LAST); return null; }
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public ListNode<Key, Value> readPayload(DataInput is) throws IOException { ListNode<Key, Value> node = new ListNode<Key, Value>(); node.setNext(is.readLong()); final short size = is.readShort(); for (short i = 0; i < size; i++) { node.entries.addLast(new KeyValueEntry(keyMarshaller.readPayload(is), valueMarshaller.readPayload(is))); } return node; } }
public Value addFirst(Transaction tx, Key key, Value value) throws IOException { if (key == null) { throw new IllegalArgumentException("Key cannot be null"); } entries.addFirst(new KeyValueEntry<Key, Value>(key, value)); store(tx, ADD_FIRST); return null; }
public Value put(Transaction tx, Key key, Value value) throws IOException { if (key == null) { throw new IllegalArgumentException("Key cannot be null"); } entries.addLast(new KeyValueEntry<Key, Value>(key, value)); store(tx, ADD_LAST); return null; }
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public ListNode<Key, Value> readPayload(DataInput is) throws IOException { ListNode<Key, Value> node = new ListNode<Key, Value>(); node.setNext(is.readLong()); final short size = is.readShort(); for (short i = 0; i < size; i++) { node.entries.addLast(new KeyValueEntry(keyMarshaller.readPayload(is), valueMarshaller.readPayload(is))); } return node; } }