public class NitriteContext
extends java.lang.Object
Represents a readonly view of all contextual information of a nitrite database.
Nitrite.getContext()
Modifier and Type | Method and Description |
---|---|
void |
dropCollection(java.lang.String name) |
int |
getAutoCommitBufferSize()
Gets the size of the auto-commit buffer.
|
java.lang.String |
getFilePath()
Gets the database file path.
|
NitriteMapper |
getNitriteMapper()
Gets the
NitriteMapper instance configured. |
java.util.Set<com.fasterxml.jackson.databind.Module> |
getRegisteredModules()
Gets the jackson
Module registered with JacksonMapper . |
java.util.concurrent.ScheduledExecutorService |
getScheduledWorkerPool() |
TextIndexingService |
getTextIndexingService()
Gets the custom
TextIndexingService implementation used for the database. |
TextTokenizer |
getTextTokenizer()
Gets the
TextTokenizer implementation used for the database. |
java.util.concurrent.ExecutorService |
getWorkerPool() |
boolean |
isAutoCommitEnabled()
Indicates if auto commit is enabled or not.
|
boolean |
isAutoCompactEnabled()
Indicates if auto compact is enabled or not before close.
|
boolean |
isCompressed()
Indicates if this is a compressed database or not.
|
boolean |
isInMemory()
Indicates if this is an in-memory database or not.
|
boolean |
isReadOnly()
Indicates if this is a readonly database or not.
|
public NitriteMapper getNitriteMapper()
Gets the NitriteMapper
instance configured.
NitriteMapper
.public java.util.Set<com.fasterxml.jackson.databind.Module> getRegisteredModules()
Gets the jackson Module
registered with JacksonMapper
.
Module
.public void dropCollection(java.lang.String name)
public java.lang.String getFilePath()
Gets the database file path. For in-memory database
it returns null
.
public int getAutoCommitBufferSize()
Gets the size of the auto-commit buffer. If the buffer size exceeds this value and auto-commit is on, nitrite will save the changes to disk.
public boolean isInMemory()
Indicates if this is an in-memory database or not.
public boolean isReadOnly()
Indicates if this is a readonly database or not.
public boolean isCompressed()
Indicates if this is a compressed database or not.
public boolean isAutoCommitEnabled()
Indicates if auto commit is enabled or not.
public boolean isAutoCompactEnabled()
Indicates if auto compact is enabled or not before close.
public TextIndexingService getTextIndexingService()
Gets the custom TextIndexingService
implementation used for the database.
It returns null
if the default TextIndexingService
implementation
is used.
public TextTokenizer getTextTokenizer()
Gets the TextTokenizer
implementation used for the database. It returns
null
if the default TextTokenizer
implementation is used.
public java.util.concurrent.ExecutorService getWorkerPool()
public java.util.concurrent.ScheduledExecutorService getScheduledWorkerPool()