public class DocumentStore extends DocumentStoreBase
Modifier and Type | Class and Description |
---|---|
protected class |
DocumentStore.ReplicationInformerGetter |
Modifier and Type | Field and Description |
---|---|
protected static ThreadLocal<UUID> |
currentSessionId |
protected Function0<IDatabaseCommands> |
databaseCommandsGenerator |
protected HttpJsonRequestFactory |
jsonRequestFactory |
conventions, failoverServers, initialized, profilingContext, subscriptions, url, useFips
Constructor and Description |
---|
DocumentStore() |
DocumentStore(String url) |
DocumentStore(String url,
String defaultDb) |
Modifier and Type | Method and Description |
---|---|
void |
addAfterDisposeEventHandler(EventHandler<VoidArgs> event)
Called after dispose is completed
|
protected void |
afterSessionCreated(InMemoryDocumentSessionOperations session) |
CleanCloseable |
aggressivelyCacheFor(long cacheDurationInMilis)
Setup the context for aggressive caching.
|
protected void |
assertValidConfiguration()
validate the configuration for the document store
|
BulkInsertOperation |
bulkInsert()
Performs bulk insert
|
BulkInsertOperation |
bulkInsert(String database)
Performs bulk insert
|
BulkInsertOperation |
bulkInsert(String database,
BulkInsertOptions options)
Performs bulk insert
|
IDatabaseChanges |
changes()
Subscribe to change notifications from the server
|
IDatabaseChanges |
changes(String database)
Subscribe to change notifications from the server
|
void |
close() |
protected IDatabaseChanges |
createDatabaseChanges(String database) |
CleanCloseable |
disableAggressiveCaching()
Setup the context for no aggressive caching
This is mainly useful for internal use inside RavenDB, when we are executing
queries that have been marked with WaitForNonStaleResults, we temporarily disable
aggressive caching.
|
String |
getApiKey() |
IDatabaseCommands |
getDatabaseCommands()
Gets the database commands.
|
String |
getDefaultDatabase() |
String |
getIdentifier()
Gets the identifier
|
HttpJsonRequestFactory |
getJsonRequestFactory()
Get the
HttpJsonRequestFactory for this store |
int |
getMaxNumberOfCachedRequests() |
ReplicationBehavior |
getReplication() |
IDocumentStoreReplicationInformer |
getReplicationInformerForDatabase() |
IDocumentStoreReplicationInformer |
getReplicationInformerForDatabase(String dbName) |
boolean |
hasJsonRequestFactory()
Whatever this instance has json request factory available
|
IDocumentStore |
initialize()
Initializes this instance.
|
protected void |
initializeInternal()
Initialize the document store access method to RavenDB
|
void |
initializeProfiling() |
IDocumentSession |
openSession()
Opens the session.
|
IDocumentSession |
openSession(OpenSessionOptions options)
Opens the session with the specified options.
|
IDocumentSession |
openSession(String database)
Opens the session for a particular database
|
void |
parseConnectionString(String connString)
Set document store settings based on a given connection string.
|
void |
removeAfterDisposeEventHandler(EventHandler<VoidArgs> event)
Remove event handler
|
void |
setApiKey(String apiKey) |
protected void |
setConnectionStringSettings(RavenConnectionStringOptions options)
Copy the relevant connection string settings
|
void |
setDefaultDatabase(String defaultDatabase) |
void |
setIdentifier(String value)
Sets the identifier
|
void |
setMaxNumberOfCachedRequests(int value) |
CleanCloseable |
setRequestsTimeoutFor(long timeout)
Setup the WebRequest timeout for the session
|
IDocumentStore |
useFips(boolean value) |
IDocumentStore |
withApiKey(String apiKey) |
addSessionCreatedInternal, aggressivelyCache, assertInitialized, ensureNotClosed, executeIndex, executeIndexes, executeTransformer, getConventions, getFailoverServers, getLastEtagHolder, getLastWrittenEtag, getListeners, getProfilingInformationFor, getRegisteredConflictListeners, getRegisteredConversionListeners, getRegisteredDeleteListeners, getRegisteredQueryListeners, getRegisteredStoreListeners, getSharedOperationsHeaders, getTransactionRecoveryStorage, getUrl, getWasDisposed, initializeEncryptor, registerListener, registerListener, registerListener, registerListener, registerListener, removeSessionCreatedInternal, setConventions, setFailoverServers, setLastEtagHolder, setListeners, setSharedOperationsHeaders, setTransactionRecoveryStorage, setUrl, setWasDisposed, sideBySideExecuteIndex, sideBySideExecuteIndex, sideBySideExecuteIndexes, sideBySideExecuteIndexes, subscriptions, withConventions
protected static ThreadLocal<UUID> currentSessionId
protected Function0<IDatabaseCommands> databaseCommandsGenerator
protected HttpJsonRequestFactory jsonRequestFactory
public DocumentStore()
public DocumentStore(String url)
public ReplicationBehavior getReplication()
public void addAfterDisposeEventHandler(EventHandler<VoidArgs> event)
event
- public String getDefaultDatabase()
public void setDefaultDatabase(String defaultDatabase)
public void removeAfterDisposeEventHandler(EventHandler<VoidArgs> event)
event
- public boolean hasJsonRequestFactory()
IDocumentStore
hasJsonRequestFactory
in interface IDocumentStore
hasJsonRequestFactory
in class DocumentStoreBase
public HttpJsonRequestFactory getJsonRequestFactory()
IDocumentStore
HttpJsonRequestFactory
for this storepublic IDatabaseCommands getDatabaseCommands()
IDocumentStore
public String getIdentifier()
IDocumentStore
public void setIdentifier(String value)
IDocumentStore
public String getApiKey()
public void setApiKey(String apiKey)
public void parseConnectionString(String connString)
connString
- protected void setConnectionStringSettings(RavenConnectionStringOptions options)
public void close()
public IDocumentSession openSession()
public IDocumentSession openSession(String database)
public IDocumentSession openSession(OpenSessionOptions options)
IDocumentStore
public IDocumentStore initialize()
IDocumentStore
public void initializeProfiling()
protected void assertValidConfiguration()
protected void initializeInternal()
public IDocumentStoreReplicationInformer getReplicationInformerForDatabase()
public IDocumentStoreReplicationInformer getReplicationInformerForDatabase(String dbName)
public CleanCloseable disableAggressiveCaching()
public IDatabaseChanges changes()
public IDatabaseChanges changes(String database)
database
- protected IDatabaseChanges createDatabaseChanges(String database)
public CleanCloseable aggressivelyCacheFor(long cacheDurationInMilis)
public int getMaxNumberOfCachedRequests()
public void setMaxNumberOfCachedRequests(int value)
public BulkInsertOperation bulkInsert()
IDocumentStore
public BulkInsertOperation bulkInsert(String database)
IDocumentStore
public BulkInsertOperation bulkInsert(String database, BulkInsertOptions options)
IDocumentStore
protected void afterSessionCreated(InMemoryDocumentSessionOperations session)
afterSessionCreated
in class DocumentStoreBase
public IDocumentStore useFips(boolean value)
public IDocumentStore withApiKey(String apiKey)
public CleanCloseable setRequestsTimeoutFor(long timeout)
timeout
- Specify the timeout durationCopyright © 2016. All Rights Reserved.