org.neo4j.index.impl.lucene
Class LuceneDataSource

java.lang.Object
  extended by org.neo4j.kernel.impl.transaction.xaframework.XaDataSource
      extended by org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource
          extended by org.neo4j.index.impl.lucene.LuceneDataSource

public class LuceneDataSource
extends org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource

An XaDataSource optimized for the LuceneIndexImplementation. This class is public because the XA framework requires it.


Nested Class Summary
static class LuceneDataSource.Configuration
           
 
Field Summary
static byte[] DEFAULT_BRANCH_ID
           
static String DEFAULT_NAME
           
static long INDEX_VERSION
           
static org.apache.lucene.analysis.Analyzer KEYWORD_ANALYZER
           
static org.apache.lucene.analysis.Analyzer LOWER_CASE_WHITESPACE_ANALYZER
          Default Analyzer for fulltext parsing.
static org.apache.lucene.util.Version LUCENE_VERSION
           
static org.apache.lucene.analysis.Analyzer WHITESPACE_ANALYZER
           
 
Constructor Summary
LuceneDataSource(org.neo4j.kernel.configuration.Config config, org.neo4j.kernel.impl.index.IndexStore indexStore, org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction fileSystemAbstraction, org.neo4j.kernel.impl.transaction.xaframework.XaFactory xaFactory)
          Constructs this data source.
 
Method Summary
 void close()
           
 long getCreationTime()
           
 long getCurrentLogVersion()
           
 long getLastCommittedTxId()
           
 long getRandomIdentifier()
           
 org.neo4j.kernel.impl.transaction.xaframework.XaConnection getXaConnection()
           
 org.neo4j.kernel.impl.transaction.xaframework.XaContainer getXaContainer()
           
 org.neo4j.helpers.collection.ClosableIterable<File> listStoreFiles(boolean includeLogicalLogs)
           
 org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> nodeIndex(String indexName, org.neo4j.graphdb.GraphDatabaseService graphDb, LuceneIndexImplementation luceneIndexImplementation)
           
 org.neo4j.graphdb.index.RelationshipIndex relationshipIndex(String indexName, org.neo4j.graphdb.GraphDatabaseService gdb, LuceneIndexImplementation luceneIndexImplementation)
           
 void setLastCommittedTxId(long txId)
           
 
Methods inherited from class org.neo4j.kernel.impl.transaction.xaframework.LogBackedXaDataSource
deleteLogicalLog, getFileName, getLogExtractor, getLogicalLog, getLogicalLogLength, getMasterForCommittedTx, getPreparedTransaction, getPreparedTransaction, hasLogicalLog, rotateLogicalLog, setAutoRotate, setLogicalLogAtCreationTime, setLogicalLogTargetSize
 
Methods inherited from class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource
applyCommittedTransaction, applyPreparedTransaction, getBranchId, getName, setRecovered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LUCENE_VERSION

public static final org.apache.lucene.util.Version LUCENE_VERSION

DEFAULT_NAME

public static final String DEFAULT_NAME
See Also:
Constant Field Values

DEFAULT_BRANCH_ID

public static final byte[] DEFAULT_BRANCH_ID

INDEX_VERSION

public static final long INDEX_VERSION

LOWER_CASE_WHITESPACE_ANALYZER

public static final org.apache.lucene.analysis.Analyzer LOWER_CASE_WHITESPACE_ANALYZER
Default Analyzer for fulltext parsing.


WHITESPACE_ANALYZER

public static final org.apache.lucene.analysis.Analyzer WHITESPACE_ANALYZER

KEYWORD_ANALYZER

public static final org.apache.lucene.analysis.Analyzer KEYWORD_ANALYZER
Constructor Detail

LuceneDataSource

public LuceneDataSource(org.neo4j.kernel.configuration.Config config,
                        org.neo4j.kernel.impl.index.IndexStore indexStore,
                        org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction fileSystemAbstraction,
                        org.neo4j.kernel.impl.transaction.xaframework.XaFactory xaFactory)
Constructs this data source.

Throws:
InstantiationException - if the data source couldn't be instantiated
Method Detail

close

public void close()
Specified by:
close in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

nodeIndex

public org.neo4j.graphdb.index.Index<org.neo4j.graphdb.Node> nodeIndex(String indexName,
                                                                       org.neo4j.graphdb.GraphDatabaseService graphDb,
                                                                       LuceneIndexImplementation luceneIndexImplementation)

relationshipIndex

public org.neo4j.graphdb.index.RelationshipIndex relationshipIndex(String indexName,
                                                                   org.neo4j.graphdb.GraphDatabaseService gdb,
                                                                   LuceneIndexImplementation luceneIndexImplementation)

getXaConnection

public org.neo4j.kernel.impl.transaction.xaframework.XaConnection getXaConnection()
Specified by:
getXaConnection in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

getCreationTime

public long getCreationTime()
Overrides:
getCreationTime in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

getRandomIdentifier

public long getRandomIdentifier()
Overrides:
getRandomIdentifier in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

getCurrentLogVersion

public long getCurrentLogVersion()
Overrides:
getCurrentLogVersion in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

getLastCommittedTxId

public long getLastCommittedTxId()
Overrides:
getLastCommittedTxId in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

setLastCommittedTxId

public void setLastCommittedTxId(long txId)
Overrides:
setLastCommittedTxId in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

getXaContainer

public org.neo4j.kernel.impl.transaction.xaframework.XaContainer getXaContainer()
Overrides:
getXaContainer in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource

listStoreFiles

public org.neo4j.helpers.collection.ClosableIterable<File> listStoreFiles(boolean includeLogicalLogs)
                                                                   throws IOException
Overrides:
listStoreFiles in class org.neo4j.kernel.impl.transaction.xaframework.XaDataSource
Throws:
IOException


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.