Class ZipNumCluster
java.lang.Object
org.archive.format.gzip.zipnum.ZipNumIndex
org.archive.format.gzip.zipnum.ZipNumCluster
- All Implemented Interfaces:
CDXInputSource
-
Nested Class Summary
Nested classes/interfaces inherited from class org.archive.format.gzip.zipnum.ZipNumIndex
ZipNumIndex.PageResult -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected booleanprotected intprotected SimpleDateFormatprotected booleanstatic final Stringprotected static final CloseableIterator<String> protected Dateprotected org.archive.format.gzip.zipnum.ZipNumCluster.BlockSize[]protected longstatic final Stringprotected intprotected ConcurrentHashMap<String, org.archive.format.gzip.zipnum.ZipNumCluster.LocCacheEntry> protected intprotected Stringprotected SeekableLineReaderFactoryprotected Stringprotected Dateprotected booleanprotected Stringprotected Datestatic final Stringprotected Dateprotected longprotected ThreadFields inherited from class org.archive.format.gzip.zipnum.ZipNumIndex
binsearchBlockSize, blockLoader, cdxLinesPerBlock, cdxLinesTotalCount, DEFAULT_USE_NIO, pathRoot, readaheadSize, required, summary, summaryFile, useNio -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongbooleandateRangeCheck(String key) getCDXIterator(String key, String prefix, boolean exact, ZipNumParams params) getCDXIterator(String key, String start, String end, ZipNumParams params) intlonggetLastBlockDiff(String startKey, int startPart, int endPart) String[]getLocations(String key) intintintlongvoidinit()booleanbooleanprotected voidloadLastBlockSizes(String filename) protected voidloadPartLocations(HashMap<String, String[]> destMap) protected StringlocCacheGet(String key) protected voidlocCachePut(String key, String loc) protected DatevoidsetCacheRemoteLoc(boolean cacheRemoteLoc) voidsetCheckInterval(int checkInterval) voidsetLocCacheExpireMillis(int locCacheExpireMillis) voidsetLocCacheMaxDuration(int locCacheMaxDuration) voidsetLocFile(String locFile) protected voidsyncLoad(long newModTime) Methods inherited from class org.archive.format.gzip.zipnum.ZipNumIndex
createIndexWithBasePath, createIndexWithSummaryPath, endKey, extractLineCount, extractLongField, getBinsearchBlockSize, getBlockLoader, getCDXIterator, getCDXIterator, getCDXIterator, getCDXIterator, getCDXIterator, getCdxLinesPerBlock, getClusterRange, getEstimateSplitSize, getLastBlockCDXLineIterator, getNthLine, getNthPage, getNumLines, getNumLines, getPathRoot, getReadaheadSize, getSummary, getSummaryFile, getTotalLength, getTotalLines, isRequired, isUseNio, setBinsearchBlockSize, setBlockLoader, setCdxLinesPerBlock, setPathRoot, setReadaheadSize, setRequired, setSummaryFile, setUseNio, wrapEndIterator, wrapPrefix, wrapReverseIterator, wrapStartEndIterator, wrapStartIterator
-
Field Details
-
EMPTY_ITERATOR
-
locMap
-
locReaderFactory
-
locFile
-
lastModTime
protected long lastModTime -
checkInterval
protected int checkInterval -
updaterThread
-
EARLIEST_TIMESTAMP
- See Also:
-
LATEST_TIMESTAMP
- See Also:
-
OFF
- See Also:
-
dateFormat
-
startDate
-
endDate
-
lastBlockSizes
protected org.archive.format.gzip.zipnum.ZipNumCluster.BlockSize[] lastBlockSizes -
blockSizesFile
-
locRoot
-
newLocRoot
-
totalAdjustment
protected long totalAdjustment -
newStartDate
-
newEndDate
-
newIsDisabled
protected boolean newIsDisabled -
disabled
protected boolean disabled -
locCacheMap
protected ConcurrentHashMap<String, org.archive.format.gzip.zipnum.ZipNumCluster.LocCacheEntry> locCacheMap -
cacheRemoteLoc
protected boolean cacheRemoteLoc -
locCacheExpireMillis
protected int locCacheExpireMillis -
locCacheMaxDuration
protected int locCacheMaxDuration
-
-
Constructor Details
-
ZipNumCluster
public ZipNumCluster()
-
-
Method Details
-
init
- Overrides:
initin classZipNumIndex- Throws:
IOException
-
syncLoad
protected void syncLoad(long newModTime) -
getLocations
-
getLocRoot
-
getLocFile
-
setLocFile
-
getLocCacheExpireMillis
public int getLocCacheExpireMillis() -
setLocCacheExpireMillis
public void setLocCacheExpireMillis(int locCacheExpireMillis) -
getLocCacheMaxDuration
public int getLocCacheMaxDuration() -
setLocCacheMaxDuration
public void setLocCacheMaxDuration(int locCacheMaxDuration) -
isCacheRemoteLoc
public boolean isCacheRemoteLoc() -
setCacheRemoteLoc
public void setCacheRemoteLoc(boolean cacheRemoteLoc) -
parseDate
-
dateRangeCheck
-
loadLastBlockSizes
-
loadPartLocations
- Throws:
IOException
-
getCheckInterval
public int getCheckInterval() -
setCheckInterval
public void setCheckInterval(int checkInterval) -
getTotalAdjustment
public long getTotalAdjustment() -
getNumBlocks
public int getNumBlocks() -
getLastBlockDiff
-
computeTotalLines
public long computeTotalLines() -
getCDXIterator
public CloseableIterator<String> getCDXIterator(String key, String start, String end, ZipNumParams params) throws IOException - Specified by:
getCDXIteratorin interfaceCDXInputSource- Overrides:
getCDXIteratorin classZipNumIndex- Throws:
IOException
-
getCDXIterator
public CloseableIterator<String> getCDXIterator(String key, String prefix, boolean exact, ZipNumParams params) throws IOException - Specified by:
getCDXIteratorin interfaceCDXInputSource- Overrides:
getCDXIteratorin classZipNumIndex- Throws:
IOException
-
isDisabled
public boolean isDisabled() -
locCacheGet
-
locCachePut
-