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 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
-
Field Summary
Fields Modifier and Type Field 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 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 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)
-
-
-
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
-
-