@SuppressWarnings("rawtypes") public ListIndex(PageFile pageFile, Page page) { this(pageFile, page.getPageId()); }
@SuppressWarnings("unchecked") public BTreeIndex(PageFile pageFile, Page page) { this(pageFile, page.getPageId()); }
public long getPageId() { return page.getPageId(); }
StoredMessageStoreStatistics(PageFile pageFile, Page page) { this(pageFile, page.getPageId()); }
public String toString() { return "[Page:" + getPageId()+", type: "+type+"]"; }
@SuppressWarnings("unchecked") public BTreeIndex(Page page) { this(page.getPageId()); }
public long getPageId() { return page.getPageId(); }
void addToCache(Page page) { if (enablePageCaching) { pageCache.put(page.getPageId(), page); } }
@Override public String toString() { return "[ListNode(" + (page != null ? page.getPageId() + "->" + next : "null") + ")[" + entries.size() + "]]"; } }
@Override public String toString() { return "PageId:" + page.getPageId() + ", index:" + containingList + super.toString(); } };
@Override public String toString() { return "[PageWrite:" + page.getPageId() + "-" + page.getType() + "]"; }
@Override public Long getKey() { return write.getPage().getPageId(); }
/** * Allocates a block of free pages that you can write data to. * * @param count the number of sequential pages to allocate * @return the first page of the sequential set. * @throws IOException * If an disk error occurred. * @throws IllegalStateException * if the PageFile is not loaded */ public <T> Page<T> allocate(int count) throws IOException { Page<T> rc = pageFile.allocate(count); allocateList.add(new Sequence(rc.getPageId(), rc.getPageId()+count-1)); return rc; }
void createIndexes(Transaction tx) throws IOException { this.lists = new BTreeIndex<String, PListImpl>(pageFile, tx.allocate().getPageId()); }
@Override public void initialize(Transaction tx) throws IOException { this.storedSchedulers = new BTreeIndex<String, JobSchedulerImpl>(store.getPageFile(), tx.allocate().getPageId()); this.journalRC = new BTreeIndex<Integer, Integer>(store.getPageFile(), tx.allocate().getPageId()); this.removeLocationTracker = new BTreeIndex<Integer, List<Integer>>(store.getPageFile(), tx.allocate().getPageId()); }
void createIndexes(Transaction tx) throws IOException { this.index = new BTreeIndex<>(this.store.getPageFile(), tx.allocate().getPageId()); }
public ListNode<Key,Value> createNode(Transaction tx) throws IOException { return createNode(tx.<ListNode<Key,Value>>load(tx.<ListNode<Key,Value>>allocate().getPageId(), null)); }
void createIndexes(Transaction tx) throws IOException { this.index = new BTreeIndex<Long, List<LegacyJobLocation>>(this.store.getPageFile(), tx.allocate().getPageId()); }
private Page readPage(Page page) throws IOException { // Read the page data pageFile.readPage(page.getPageId(), chunk.getData()); chunk.setOffset(0); chunk.setLength(pageFile.getPageSize()); DataByteArrayInputStream in = new DataByteArrayInputStream(chunk); page.read(in); chunk.setOffset(Page.PAGE_HEADER_SIZE); if (page.getType() == Page.PAGE_END_TYPE) { chunk.setLength((int)(page.getNext())); } if (page.getType() == Page.PAGE_FREE_TYPE) { throw new EOFException("Chunk stream does not exist, page: " + page.getPageId() + " is marked free"); } return page; }