public class FSLogicalAddressingIndex
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
FSLogicalAddressingIndex.L2PIndexHeader |
private static class |
FSLogicalAddressingIndex.L2PPageInfo |
private static class |
FSLogicalAddressingIndex.P2LIndexHeader |
private static class |
FSLogicalAddressingIndex.P2LPageInfo |
private static class |
FSLogicalAddressingIndex.Page |
private static class |
FSLogicalAddressingIndex.PageTableEntry |
Modifier and Type | Field and Description |
---|---|
private FSFS |
fsfs |
static java.lang.String |
L2P_STREAM_PREFIX |
private FSFile |
myFile |
static java.lang.String |
P2L_STREAM_PREFIX |
private long |
startRevision |
Constructor and Description |
---|
FSLogicalAddressingIndex(FSFS fsfs,
FSFile myFile) |
Modifier and Type | Method and Description |
---|---|
private void |
appendP2LEntries(java.util.List<FSP2LEntry> entries,
java.util.List<FSP2LEntry> pageEntries,
long blockStart,
long blockEnd) |
private FSPackedNumbersStream |
autoOpenL2PIndex() |
private FSPackedNumbersStream |
autoOpenP2LIndex() |
static int |
compareEntryOffset(FSP2LEntry entry,
long offset) |
private FSLogicalAddressingIndex.L2PPageInfo |
createPageInfo(FSLogicalAddressingIndex.L2PIndexHeader header,
long revision,
long itemIndex) |
private FSLogicalAddressingIndex.P2LPageInfo |
createPageInfo(FSLogicalAddressingIndex.P2LIndexHeader header,
long revision,
long offset) |
long |
getItemIndexByOffset(long offset) |
private FSLogicalAddressingIndex.L2PIndexHeader |
getL2PHeaderBody(long revision) |
private FSLogicalAddressingIndex.Page |
getL2PPage(FSLogicalAddressingIndex.PageTableEntry tableEntry) |
private long |
getL2PPageEntry(FSLogicalAddressingIndex.Page page,
long pageOffset,
long itemIndex,
long revision) |
private FSLogicalAddressingIndex.L2PPageInfo |
getL2PPageInfo(long revision,
long itemIndex) |
long |
getOffsetByItemIndex(long revision,
long itemIndex) |
private FSLogicalAddressingIndex.P2LIndexHeader |
getP2LHeader() |
protected FSLogicalAddressingIndex.P2LPageInfo |
getP2LKeys(long revision,
long offset) |
private java.util.List<FSP2LEntry> |
getP2LPage(long startRevision,
long startOffset,
long nextOffset,
long pageStart,
long pageSize) |
private FSLogicalAddressingIndex.P2LPageInfo |
getP2LPageInfo(long revision,
long offset) |
long |
getStartRevision(long revision) |
java.util.List<FSP2LEntry> |
lookupP2LEntries(long revision,
long blockStart,
long blockEnd) |
private FSPackedNumbersStream |
packedStreamOpen(java.lang.String prefix) |
private void |
readEntryToList(FSPackedNumbersStream packedNumbersStream,
long[] itemOffset,
long[] lastRevision,
long[] lastCompound,
java.util.List<FSP2LEntry> result) |
static int |
searchLowerBound(java.util.List<FSP2LEntry> list,
long key) |
public static final java.lang.String L2P_STREAM_PREFIX
public static final java.lang.String P2L_STREAM_PREFIX
private FSFile myFile
private long startRevision
private FSFS fsfs
public long getStartRevision(long revision)
public long getOffsetByItemIndex(long revision, long itemIndex) throws SVNException
SVNException
public long getItemIndexByOffset(long offset)
public java.util.List<FSP2LEntry> lookupP2LEntries(long revision, long blockStart, long blockEnd) throws SVNException
SVNException
protected FSLogicalAddressingIndex.P2LPageInfo getP2LKeys(long revision, long offset) throws SVNException
SVNException
private FSLogicalAddressingIndex.P2LPageInfo getP2LPageInfo(long revision, long offset) throws SVNException
SVNException
private FSLogicalAddressingIndex.P2LIndexHeader getP2LHeader() throws SVNException
SVNException
private FSLogicalAddressingIndex.P2LPageInfo createPageInfo(FSLogicalAddressingIndex.P2LIndexHeader header, long revision, long offset)
private void appendP2LEntries(java.util.List<FSP2LEntry> entries, java.util.List<FSP2LEntry> pageEntries, long blockStart, long blockEnd)
public static int searchLowerBound(java.util.List<FSP2LEntry> list, long key)
public static int compareEntryOffset(FSP2LEntry entry, long offset)
private java.util.List<FSP2LEntry> getP2LPage(long startRevision, long startOffset, long nextOffset, long pageStart, long pageSize) throws SVNException
SVNException
private void readEntryToList(FSPackedNumbersStream packedNumbersStream, long[] itemOffset, long[] lastRevision, long[] lastCompound, java.util.List<FSP2LEntry> result) throws SVNException
SVNException
private long getL2PPageEntry(FSLogicalAddressingIndex.Page page, long pageOffset, long itemIndex, long revision) throws SVNException
SVNException
private FSLogicalAddressingIndex.Page getL2PPage(FSLogicalAddressingIndex.PageTableEntry tableEntry) throws SVNException
SVNException
private FSLogicalAddressingIndex.L2PPageInfo getL2PPageInfo(long revision, long itemIndex) throws SVNException
SVNException
private FSLogicalAddressingIndex.L2PPageInfo createPageInfo(FSLogicalAddressingIndex.L2PIndexHeader header, long revision, long itemIndex) throws SVNException
SVNException
private FSLogicalAddressingIndex.L2PIndexHeader getL2PHeaderBody(long revision) throws SVNException
SVNException
private FSPackedNumbersStream autoOpenP2LIndex() throws SVNException
SVNException
private FSPackedNumbersStream autoOpenL2PIndex() throws SVNException
SVNException
private FSPackedNumbersStream packedStreamOpen(java.lang.String prefix) throws SVNException
SVNException