static public void process(final InputStream in, final ISnapshotData snapshotData, final OutputStream out) throws IOException { final Iterator<ISnapshotEntry> bbs = snapshotData.entries();
buf[i] = 'Y'; tm.put(pos, buf);
buf[i] = 'Y'; tm.put(pos, buf);
static public void process(final InputStream in, final ISnapshotData snapshotData, final OutputStream out) throws IOException { final Iterator<ISnapshotEntry> bbs = snapshotData.entries();
public void test_snapshotData() throws IOException { final Journal journal = (Journal) getStore(0); // remember no history! try { for (int i = 0; i < 100; i++) commitSomeData(journal); final AtomicReference<IRootBlockView> rbv = new AtomicReference<IRootBlockView>(); final Iterator<ISnapshotEntry> data = journal.snapshotAllocationData(rbv).entries(); while (data.hasNext()) { final ISnapshotEntry e = data.next(); log.info("Position: " + e.getAddress() + ", data size: " + e.getData().length); } } finally { journal.destroy(); } }
public void test_snapshotData() throws IOException { final Journal journal = (Journal) getStore(0); // remember no history! try { for (int i = 0; i < 100; i++) commitSomeData(journal); final AtomicReference<IRootBlockView> rbv = new AtomicReference<IRootBlockView>(); final Iterator<ISnapshotEntry> data = journal.snapshotAllocationData(rbv).entries(); while (data.hasNext()) { final ISnapshotEntry e = data.next(); log.info("Position: " + e.getAddress() + ", data size: " + e.getData().length); } } finally { journal.destroy(); } }
/** * Add the address/byte[] to the snapshot representing the metabits allocaiton data * * @throws IOException */ public void snapshotMetabits(final ISnapshotData tm) throws IOException { final long mba; if (m_metaBitsAddr < 0) { mba = physicalAddress((int) m_metaBitsAddr); } else { // long ret = physicalAddress((int) m_metaBitsAddr); mba = convertAddr(-m_metaBitsAddr); // maximum 48 bit address range } tm.put(mba, genMetabitsData()); }
/** * Add the address/byte[] to the snapshot representing the metabits allocaiton data * * @throws IOException */ public void snapshotMetabits(final ISnapshotData tm) throws IOException { final long mba; if (m_metaBitsAddr < 0) { mba = physicalAddress((int) m_metaBitsAddr); } else { // long ret = physicalAddress((int) m_metaBitsAddr); mba = convertAddr(-m_metaBitsAddr); // maximum 48 bit address range } tm.put(mba, genMetabitsData()); }
/** * Add a copy of the currently committed allocation data to the snapshot. This is used by the snapshot * mechanism to ensure that a file copy, taken over the course of multiple commits, will contain the * correct allocation data from the time the snapshot was taken. */ void snapshot(final ISnapshotData tm) { if (m_diskAddr > 0) tm.put(m_store.metaBit2Addr(m_diskAddr), commitData()); }
/** * Add a copy of the currently committed allocation data to the snapshot. This is used by the snapshot * mechanism to ensure that a file copy, taken over the course of multiple commits, will contain the * correct allocation data from the time the snapshot was taken. */ void snapshot(final ISnapshotData tm) { if (m_diskAddr > 0) tm.put(m_store.metaBit2Addr(m_diskAddr), commitData()); }