Class LogStore
java.lang.Object
org.apache.jackrabbit.oak.index.indexer.document.tree.store.LogStore
- All Implemented Interfaces:
Store
A wrapper for storage backends that allows to log store and read operations.
-
Field Summary
Fields inherited from interface org.apache.jackrabbit.oak.index.indexer.document.tree.store.Store
DEFAULT_MAX_FILE_SIZE_BYTES, MAX_FILE_SIZE_BYTES
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the storebyte[]
getIfExists
(String key) Get a file if it existslong
Get the maximum file size configured.long
Get the number of files read.long
Get the number of files written.keySet()
Get the list of files.Generate a new file name.void
Storage a file.void
void
Remove a number of files.void
Remove all files.void
setWriteCompression
(Compression compression) Set the compression algorithm used for writing from now on.boolean
toString()
-
Method Details
-
toString
-
getIfExists
Description copied from interface:Store
Get a file if it exists- Specified by:
getIfExists
in interfaceStore
- Parameters:
key
- the file name- Returns:
- the file, or null
-
put
Description copied from interface:Store
Storage a file. -
newFileName
Description copied from interface:Store
Generate a new file name.- Specified by:
newFileName
in interfaceStore
- Returns:
-
keySet
Description copied from interface:Store
Get the list of files. -
remove
Description copied from interface:Store
Remove a number of files. -
removeAll
public void removeAll()Description copied from interface:Store
Remove all files. -
getWriteCount
public long getWriteCount()Description copied from interface:Store
Get the number of files written.- Specified by:
getWriteCount
in interfaceStore
- Returns:
- the result
-
getReadCount
public long getReadCount()Description copied from interface:Store
Get the number of files read.- Specified by:
getReadCount
in interfaceStore
- Returns:
- the result
-
setWriteCompression
Description copied from interface:Store
Set the compression algorithm used for writing from now on.- Specified by:
setWriteCompression
in interfaceStore
- Parameters:
compression
- the compression algorithm
-
close
public void close()Description copied from interface:Store
Close the store -
getConfig
-
supportsByteOperations
public boolean supportsByteOperations()- Specified by:
supportsByteOperations
in interfaceStore
-
getBytes
-
putBytes
-
getMaxFileSizeBytes
public long getMaxFileSizeBytes()Description copied from interface:Store
Get the maximum file size configured.- Specified by:
getMaxFileSizeBytes
in interfaceStore
- Returns:
- the file size, in bytes
-