Module org.elasticsearch.server
Package org.elasticsearch.index.store
Class ByteSizeCachingDirectory
java.lang.Object
org.apache.lucene.store.Directory
org.apache.lucene.store.FilterDirectory
org.elasticsearch.index.store.ByteSizeDirectory
org.elasticsearch.index.store.ByteSizeCachingDirectory
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
Fields inherited from class org.apache.lucene.store.FilterDirectory
in -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.store.IndexOutputcreateOutput(String name, org.apache.lucene.store.IOContext context) org.apache.lucene.store.IndexOutputcreateTempOutput(String prefix, String suffix, org.apache.lucene.store.IOContext context) voiddeleteFile(String name) longlongvoidMark the cached size as stale so that it is guaranteed to be refreshed the next time.static ByteSizeCachingDirectoryunwrapDirectory(org.apache.lucene.store.Directory dir) Methods inherited from class org.elasticsearch.index.store.ByteSizeDirectory
estimateSizeInBytesMethods inherited from class org.apache.lucene.store.FilterDirectory
close, ensureOpen, fileLength, getDelegate, getPendingDeletions, listAll, obtainLock, openInput, rename, sync, syncMetaData, toString, unwrapMethods inherited from class org.apache.lucene.store.Directory
copyFrom, getTempFileName, openChecksumInput
-
Method Details
-
estimateSizeInBytes
- Specified by:
estimateSizeInBytesin classByteSizeDirectory- Returns:
- the size of the directory
- Throws:
IOException- if an I/O error occurs
-
estimateDataSetSizeInBytes
- Specified by:
estimateDataSetSizeInBytesin classByteSizeDirectory- Returns:
- the size of the total data set of the directory (which can differ from {
ByteSizeDirectory.estimateSizeInBytes()}) - Throws:
IOException- if an I/O error occurs
-
createOutput
public org.apache.lucene.store.IndexOutput createOutput(String name, org.apache.lucene.store.IOContext context) throws IOException - Overrides:
createOutputin classorg.apache.lucene.store.FilterDirectory- Throws:
IOException
-
createTempOutput
public org.apache.lucene.store.IndexOutput createTempOutput(String prefix, String suffix, org.apache.lucene.store.IOContext context) throws IOException - Overrides:
createTempOutputin classorg.apache.lucene.store.FilterDirectory- Throws:
IOException
-
deleteFile
- Overrides:
deleteFilein classorg.apache.lucene.store.FilterDirectory- Throws:
IOException
-
markEstimatedSizeAsStale
public void markEstimatedSizeAsStale()Mark the cached size as stale so that it is guaranteed to be refreshed the next time. -
unwrapDirectory
-