Class MemoryStore
- java.lang.Object
-
- org.apache.jackrabbit.oak.index.indexer.document.tree.store.MemoryStore
-
-
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
-
-
Constructor Summary
Constructors Constructor Description MemoryStore()
MemoryStore(Properties config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the storeProperties
getConfig()
PageFile
getIfExists(String key)
Get a file if it existslong
getMaxFileSizeBytes()
Get the maximum file size configured.long
getReadCount()
Get the number of files read.long
getWriteCount()
Get the number of files written.Set<String>
keySet()
Get the list of files.String
newFileName()
Generate a new file name.void
put(String key, PageFile file)
Storage a file.void
remove(Set<String> set)
Remove a number of files.void
removeAll()
Remove all files.void
setWriteCompression(Compression compression)
Set the compression algorithm used for writing from now on.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.oak.index.indexer.document.tree.store.Store
get, getBytes, putBytes, supportsByteOperations
-
-
-
-
Constructor Detail
-
MemoryStore
public MemoryStore()
-
MemoryStore
public MemoryStore(Properties config)
-
-
Method Detail
-
setWriteCompression
public void setWriteCompression(Compression compression)
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
-
getIfExists
public PageFile getIfExists(String key)
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
public void put(String key, PageFile file)
Description copied from interface:Store
Storage a file.
-
newFileName
public String newFileName()
Description copied from interface:Store
Generate a new file name.- Specified by:
newFileName
in interfaceStore
- Returns:
-
remove
public void remove(Set<String> set)
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
-
close
public void close()
Description copied from interface:Store
Close the store
-
getConfig
public Properties getConfig()
-
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
-
-