public final class EmbeddedReadOnlyGraphDatabase extends InternalAbstractGraphDatabase
EmbeddedGraphDatabase
.
Create an instance this way:
Map config = new HashMap();
config.put( "read_only", "true" );
graphDb = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(
"var/graphdb" )
.setConfig( config )
.newGraphDatabase();
InternalAbstractGraphDatabase.Configuration, InternalAbstractGraphDatabase.DefaultKernelData
cacheBridge, caches, cleanupService, config, dependencyResolver, diagnosticsManager, extensions, fileSystem, guard, idGeneratorFactory, indexManager, indexStore, jobScheduler, kernelAPI, kernelEventHandlers, kernelPanicEventGenerator, labelTokenHolder, life, lockManager, logBufferFactory, logging, msgLog, neoDataSource, nodeAutoIndexer, nodeManager, params, persistenceManager, persistenceSource, propertyKeyTokenHolder, recoveryVerifier, relationshipTypeCreator, relationshipTypeTokenHolder, relAutoIndexer, schema, stateFactory, statementContextProvider, storeDir, storeFactory, storeId, storeLocker, syncHook, transactionEventHandlers, txHook, txIdGenerator, txManager, updateableSchemaState, xaDataSourceManager, xaFactory
Constructor and Description |
---|
EmbeddedReadOnlyGraphDatabase(String storeDir)
Deprecated.
|
EmbeddedReadOnlyGraphDatabase(String storeDir,
Map<String,String> params)
Deprecated.
|
EmbeddedReadOnlyGraphDatabase(String storeDir,
Map<String,String> params,
Iterable<IndexProvider> indexProviders,
Iterable<KernelExtensionFactory<?>> kernelExtensions,
Iterable<org.neo4j.kernel.impl.cache.CacheProvider> cacheProviders,
Iterable<org.neo4j.kernel.impl.transaction.xaframework.TransactionInterceptorProvider> transactionInterceptorProviders) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isHighlyAvailable() |
KernelEventHandler |
registerKernelEventHandler(KernelEventHandler handler)
Registers
handler as a handler for kernel events which
are generated from different places in the lifecycle of the kernel. |
<T> TransactionEventHandler<T> |
registerTransactionEventHandler(TransactionEventHandler<T> handler)
Registers
handler as a handler for transaction events which
are generated from different places in the lifecycle of each
transaction. |
KernelEventHandler |
unregisterKernelEventHandler(KernelEventHandler handler)
Unregisters
handler from the list of kernel event handlers. |
<T> TransactionEventHandler<T> |
unregisterTransactionEventHandler(TransactionEventHandler<T> handler)
Unregisters
handler from the list of transaction event handlers. |
beginTx, beginTx, create, createCaches, createCleanupService, createFileSystemAbstraction, createIdGeneratorFactory, createKernelData, createLabelIdCreator, createLockManager, createLogging, createNeoDataSource, createNode, createNode, createNodeLookup, createPropertyKeyCreator, createRecoveryVerifier, createRelationshipLookups, createRelationshipTypeCreator, createStoreFactory, createTransactionStateFactory, createTxHook, createTxIdGenerator, createXaDataSourceManager, doAfterRecoveryAndStartup, equals, findNodesByLabelAndProperty, getAllNodes, getConfig, getDependencyResolver, getDiagnosticsManager, getGuard, getIdGeneratorFactory, getKernelData, getKernelPanicGenerator, getLockManager, getMessageLog, getNodeById, getNodeManager, getPersistenceSource, getReferenceNode, getRelationshipById, getRelationshipTypes, getRelationshipTypeTokenHolder, getStoreDir, getStoreId, getTxIdGenerator, getTxManager, getXaDataSourceManager, hashCode, index, isEphemeral, registerRecovery, run, schema, shutdown, toString, transactionRunning, tx
@Deprecated public EmbeddedReadOnlyGraphDatabase(String storeDir)
GraphDatabaseService
with a set of configuration parameters. Will
most likely be removed in future releases.
Creates an embedded GraphDatabaseService
with a store located in
storeDir
. If the directory shouldn't exist or isn't a neo4j
store an exception will be thrown.
This is deprecated. Use GraphDatabaseFactory
instead.storeDir
- the store directory for the Neo4j store files@Deprecated public EmbeddedReadOnlyGraphDatabase(String storeDir, Map<String,String> params)
GraphDatabaseService
with a set of configuration parameters. Will
most likely be removed in future releases.
Creates an embedded GraphDatabaseService
with a store located in
storeDir
. If the directory shouldn't exist or isn't a neo4j
store an exception will be thrown.
This is deprecated. Use GraphDatabaseFactory
instead.storeDir
- the store directory for the db filesparams
- configuration parameterspublic EmbeddedReadOnlyGraphDatabase(String storeDir, Map<String,String> params, Iterable<IndexProvider> indexProviders, Iterable<KernelExtensionFactory<?>> kernelExtensions, Iterable<org.neo4j.kernel.impl.cache.CacheProvider> cacheProviders, Iterable<org.neo4j.kernel.impl.transaction.xaframework.TransactionInterceptorProvider> transactionInterceptorProviders)
protected boolean isHighlyAvailable()
isHighlyAvailable
in class InternalAbstractGraphDatabase
public KernelEventHandler registerKernelEventHandler(KernelEventHandler handler)
GraphDatabaseService
handler
as a handler for kernel events which
are generated from different places in the lifecycle of the kernel.
To guarantee proper behaviour the handler should be registered right
after the graph database has been started. If the specified handler
instance has already been registered this method will do nothing.registerKernelEventHandler
in interface GraphDatabaseService
registerKernelEventHandler
in class InternalAbstractGraphDatabase
handler
- the handler to receive events about different states
in the kernel lifecycle.public <T> TransactionEventHandler<T> registerTransactionEventHandler(TransactionEventHandler<T> handler)
GraphDatabaseService
handler
as a handler for transaction events which
are generated from different places in the lifecycle of each
transaction. To guarantee that the handler gets all events properly
it shouldn't be registered when the application is running (i.e. in the
middle of one or more transactions). If the specified handler instance
has already been registered this method will do nothing.registerTransactionEventHandler
in interface GraphDatabaseService
registerTransactionEventHandler
in class InternalAbstractGraphDatabase
T
- the type of state object used in the handler, see more
documentation about it at TransactionEventHandler
.handler
- the handler to receive events about different states
in transaction lifecycles.public KernelEventHandler unregisterKernelEventHandler(KernelEventHandler handler)
GraphDatabaseService
handler
from the list of kernel event handlers.
If handler
hasn't been registered with
GraphDatabaseService.registerKernelEventHandler(KernelEventHandler)
prior to calling
this method an IllegalStateException
will be thrown.
After a successful call to this method the handler
will no
longer receive any kernel events.unregisterKernelEventHandler
in interface GraphDatabaseService
unregisterKernelEventHandler
in class InternalAbstractGraphDatabase
handler
- the handler to receive events about different states
in the kernel lifecycle.public <T> TransactionEventHandler<T> unregisterTransactionEventHandler(TransactionEventHandler<T> handler)
GraphDatabaseService
handler
from the list of transaction event handlers.
If handler
hasn't been registered with
GraphDatabaseService.registerTransactionEventHandler(TransactionEventHandler)
prior
to calling this method an IllegalStateException
will be thrown.
After a successful call to this method the handler
will no
longer receive any transaction events.unregisterTransactionEventHandler
in interface GraphDatabaseService
unregisterTransactionEventHandler
in class InternalAbstractGraphDatabase
T
- the type of state object used in the handler, see more
documentation about it at TransactionEventHandler
.handler
- the handler to receive events about different states
in transaction lifecycles.Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.