public boolean isTail() { return getPageId() == containingList.getTailPageId(); }
public boolean isHead() { return getPageId() == containingList.getHeadPageId(); }
public void clear(Transaction tx) throws IOException { entries.clear(); tx.free(this.getPageId()); }
private void store(Transaction tx, boolean addFirst) throws IOException { try { // keeping splitting till we get down to a single entry // then we need to overflow the value getContainingList().storeNode(tx, this, entries.size() == 1); if (this.next == -1) { getContainingList().setTailPageId(getPageId()); } } catch (Transaction.PageOverflowIOException e) { // If we get an overflow split(tx, addFirst); } }
private void split(Transaction tx, boolean isAddFirst) throws IOException { ListNode<Key, Value> extension = getContainingList().createNode(tx); if (isAddFirst) { // head keeps the first entry, insert extension with the rest extension.setEntries(entries.getHead().splitAfter()); extension.setNext(this.getNext()); extension.store(tx, isAddFirst); this.setNext(extension.getPageId()); } else { extension.setEntries(entries.getTail().getPrevious().splitAfter()); extension.setNext(this.getNext()); extension.store(tx, isAddFirst); getContainingList().setTailPageId(extension.getPageId()); this.setNext(extension.getPageId()); } store(tx, true); }
size.addAndGet(node.size(tx)); onLoad(node, tx); setTailPageId(node.getPageId());
public boolean isHead() { return getPageId() == containingList.getHeadPageId(); }
public boolean isTail() { return getPageId() == containingList.getTailPageId(); }
public boolean isHead() { return getPageId() == containingList.getHeadPageId(); }
public boolean isHead() { return getPageId() == containingList.getHeadPageId(); }
public boolean isTail() { return getPageId() == containingList.getTailPageId(); }
public boolean isTail() { return getPageId() == containingList.getTailPageId(); }
public void clear(Transaction tx) throws IOException { entries.clear(); tx.free(this.getPageId()); }
public void clear(Transaction tx) throws IOException { entries.clear(); tx.free(this.getPageId()); }
public void clear(Transaction tx) throws IOException { entries.clear(); tx.free(this.getPageId()); }
private void store(Transaction tx, boolean addFirst) throws IOException { try { // keeping splitting till we get down to a single entry // then we need to overflow the value getContainingList().storeNode(tx, this, entries.size() == 1); if (this.next == -1) { getContainingList().setTailPageId(getPageId()); } } catch (Transaction.PageOverflowIOException e) { // If we get an overflow split(tx, addFirst); } }
private void store(Transaction tx, boolean addFirst) throws IOException { try { // keeping splitting till we get down to a single entry // then we need to overflow the value getContainingList().storeNode(tx, this, entries.size() == 1); if (this.next == -1) { getContainingList().setTailPageId(getPageId()); } } catch (Transaction.PageOverflowIOException e) { // If we get an overflow split(tx, addFirst); } }
private void store(Transaction tx, boolean addFirst) throws IOException { try { // keeping splitting till we get down to a single entry // then we need to overflow the value getContainingList().storeNode(tx, this, entries.size() == 1); if (this.next == -1) { getContainingList().setTailPageId(getPageId()); } } catch (Transaction.PageOverflowIOException e) { // If we get an overflow split(tx, addFirst); } }
private void split(Transaction tx, boolean isAddFirst) throws IOException { ListNode<Key, Value> extension = getContainingList().createNode(tx); if (isAddFirst) { // head keeps the first entry, insert extension with the rest extension.setEntries(entries.getHead().splitAfter()); extension.setNext(this.getNext()); extension.store(tx, isAddFirst); this.setNext(extension.getPageId()); } else { extension.setEntries(entries.getTail().getPrevious().splitAfter()); extension.setNext(this.getNext()); extension.store(tx, isAddFirst); getContainingList().setTailPageId(extension.getPageId()); this.setNext(extension.getPageId()); } store(tx, true); }
private void split(Transaction tx, boolean isAddFirst) throws IOException { ListNode<Key, Value> extension = getContainingList().createNode(tx); if (isAddFirst) { // head keeps the first entry, insert extension with the rest extension.setEntries(entries.getHead().splitAfter()); extension.setNext(this.getNext()); extension.store(tx, isAddFirst); this.setNext(extension.getPageId()); } else { extension.setEntries(entries.getTail().getPrevious().splitAfter()); extension.setNext(this.getNext()); extension.store(tx, isAddFirst); getContainingList().setTailPageId(extension.getPageId()); this.setNext(extension.getPageId()); } store(tx, true); }