Class FSLogicalAddressingIndex
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.io.fs.index.FSLogicalAddressingIndex
-
public class FSLogicalAddressingIndex extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classFSLogicalAddressingIndex.L2PIndexHeaderprivate static classFSLogicalAddressingIndex.L2PPageInfoprivate static classFSLogicalAddressingIndex.P2LIndexHeaderprivate static classFSLogicalAddressingIndex.P2LPageInfoprivate static classFSLogicalAddressingIndex.Pageprivate static classFSLogicalAddressingIndex.PageTableEntry
-
Field Summary
Fields Modifier and Type Field Description private FSFSfsfsstatic java.lang.StringL2P_STREAM_PREFIXprivate FSFilemyFilestatic java.lang.StringP2L_STREAM_PREFIXprivate longstartRevision
-
Constructor Summary
Constructors Constructor Description FSLogicalAddressingIndex(FSFS fsfs, FSFile myFile)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidappendP2LEntries(java.util.List<FSP2LEntry> entries, java.util.List<FSP2LEntry> pageEntries, long blockStart, long blockEnd)private FSPackedNumbersStreamautoOpenL2PIndex()private FSPackedNumbersStreamautoOpenP2LIndex()static intcompareEntryOffset(FSP2LEntry entry, long offset)private FSLogicalAddressingIndex.L2PPageInfocreatePageInfo(FSLogicalAddressingIndex.L2PIndexHeader header, long revision, long itemIndex)private FSLogicalAddressingIndex.P2LPageInfocreatePageInfo(FSLogicalAddressingIndex.P2LIndexHeader header, long revision, long offset)longgetItemIndexByOffset(long offset)private FSLogicalAddressingIndex.L2PIndexHeadergetL2PHeaderBody(long revision)private FSLogicalAddressingIndex.PagegetL2PPage(FSLogicalAddressingIndex.PageTableEntry tableEntry)private longgetL2PPageEntry(FSLogicalAddressingIndex.Page page, long pageOffset, long itemIndex, long revision)private FSLogicalAddressingIndex.L2PPageInfogetL2PPageInfo(long revision, long itemIndex)longgetOffsetByItemIndex(long revision, long itemIndex)private FSLogicalAddressingIndex.P2LIndexHeadergetP2LHeader()protected FSLogicalAddressingIndex.P2LPageInfogetP2LKeys(long revision, long offset)private java.util.List<FSP2LEntry>getP2LPage(long startRevision, long startOffset, long nextOffset, long pageStart, long pageSize)private FSLogicalAddressingIndex.P2LPageInfogetP2LPageInfo(long revision, long offset)longgetStartRevision(long revision)java.util.List<FSP2LEntry>lookupP2LEntries(long revision, long blockStart, long blockEnd)private FSPackedNumbersStreampackedStreamOpen(java.lang.String prefix)private voidreadEntryToList(FSPackedNumbersStream packedNumbersStream, long[] itemOffset, long[] lastRevision, long[] lastCompound, java.util.List<FSP2LEntry> result)static intsearchLowerBound(java.util.List<FSP2LEntry> list, long key)
-
-
-
Field Detail
-
L2P_STREAM_PREFIX
public static final java.lang.String L2P_STREAM_PREFIX
- See Also:
- Constant Field Values
-
P2L_STREAM_PREFIX
public static final java.lang.String P2L_STREAM_PREFIX
- See Also:
- Constant Field Values
-
myFile
private FSFile myFile
-
startRevision
private long startRevision
-
fsfs
private FSFS fsfs
-
-
Method Detail
-
getStartRevision
public long getStartRevision(long revision)
-
getOffsetByItemIndex
public long getOffsetByItemIndex(long revision, long itemIndex) throws SVNException- Throws:
SVNException
-
getItemIndexByOffset
public long getItemIndexByOffset(long offset)
-
lookupP2LEntries
public java.util.List<FSP2LEntry> lookupP2LEntries(long revision, long blockStart, long blockEnd) throws SVNException
- Throws:
SVNException
-
getP2LKeys
protected FSLogicalAddressingIndex.P2LPageInfo getP2LKeys(long revision, long offset) throws SVNException
- Throws:
SVNException
-
getP2LPageInfo
private FSLogicalAddressingIndex.P2LPageInfo getP2LPageInfo(long revision, long offset) throws SVNException
- Throws:
SVNException
-
getP2LHeader
private FSLogicalAddressingIndex.P2LIndexHeader getP2LHeader() throws SVNException
- Throws:
SVNException
-
createPageInfo
private FSLogicalAddressingIndex.P2LPageInfo createPageInfo(FSLogicalAddressingIndex.P2LIndexHeader header, long revision, long offset)
-
appendP2LEntries
private void appendP2LEntries(java.util.List<FSP2LEntry> entries, java.util.List<FSP2LEntry> pageEntries, long blockStart, long blockEnd)
-
searchLowerBound
public static int searchLowerBound(java.util.List<FSP2LEntry> list, long key)
-
compareEntryOffset
public static int compareEntryOffset(FSP2LEntry entry, long offset)
-
getP2LPage
private java.util.List<FSP2LEntry> getP2LPage(long startRevision, long startOffset, long nextOffset, long pageStart, long pageSize) throws SVNException
- Throws:
SVNException
-
readEntryToList
private void readEntryToList(FSPackedNumbersStream packedNumbersStream, long[] itemOffset, long[] lastRevision, long[] lastCompound, java.util.List<FSP2LEntry> result) throws SVNException
- Throws:
SVNException
-
getL2PPageEntry
private long getL2PPageEntry(FSLogicalAddressingIndex.Page page, long pageOffset, long itemIndex, long revision) throws SVNException
- Throws:
SVNException
-
getL2PPage
private FSLogicalAddressingIndex.Page getL2PPage(FSLogicalAddressingIndex.PageTableEntry tableEntry) throws SVNException
- Throws:
SVNException
-
getL2PPageInfo
private FSLogicalAddressingIndex.L2PPageInfo getL2PPageInfo(long revision, long itemIndex) throws SVNException
- Throws:
SVNException
-
createPageInfo
private FSLogicalAddressingIndex.L2PPageInfo createPageInfo(FSLogicalAddressingIndex.L2PIndexHeader header, long revision, long itemIndex) throws SVNException
- Throws:
SVNException
-
getL2PHeaderBody
private FSLogicalAddressingIndex.L2PIndexHeader getL2PHeaderBody(long revision) throws SVNException
- Throws:
SVNException
-
autoOpenP2LIndex
private FSPackedNumbersStream autoOpenP2LIndex() throws SVNException
- Throws:
SVNException
-
autoOpenL2PIndex
private FSPackedNumbersStream autoOpenL2PIndex() throws SVNException
- Throws:
SVNException
-
packedStreamOpen
private FSPackedNumbersStream packedStreamOpen(java.lang.String prefix) throws SVNException
- Throws:
SVNException
-
-