本文整理汇总了Java中org.neo4j.kernel.extension.KernelExtensionFactory类的典型用法代码示例。如果您正苦于以下问题:Java KernelExtensionFactory类的具体用法?Java KernelExtensionFactory怎么用?Java KernelExtensionFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
KernelExtensionFactory类属于org.neo4j.kernel.extension包,在下文中一共展示了KernelExtensionFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onlyRealLuceneExtensions
import org.neo4j.kernel.extension.KernelExtensionFactory; //导入依赖的package包/类
@SuppressWarnings( "rawtypes" )
private Predicate<? super KernelExtensionFactory> onlyRealLuceneExtensions()
{
return new Predicate<KernelExtensionFactory>()
{
@Override
public boolean test( KernelExtensionFactory extension )
{
if ( extension instanceof InMemoryLabelScanStoreExtension ||
extension instanceof InMemoryIndexProviderFactory )
{
return false;
}
return true;
}
};
}
开发者ID:neo4j-contrib,项目名称:neo4j-lucene5-index,代码行数:18,代码来源:TestLuceneBatchInsert.java
示例2: createAlwaysInitiallyPopulatingLuceneIndexFactory
import org.neo4j.kernel.extension.KernelExtensionFactory; //导入依赖的package包/类
private KernelExtensionFactory<?> createAlwaysInitiallyPopulatingLuceneIndexFactory()
{
return new KernelExtensionFactory<LuceneSchemaIndexProviderFactory.Dependencies>(
LuceneSchemaIndexProviderFactory.PROVIDER_DESCRIPTOR.getKey() )
{
@Override
public Lifecycle newInstance( KernelContext context, LuceneSchemaIndexProviderFactory.Dependencies dependencies )
throws Throwable
{
return new LuceneSchemaIndexProvider( fs.get(), ignoreCloseDirectoryFactory, context.storeDir() )
{
@Override
public InternalIndexState getInitialState( long indexId )
{
return InternalIndexState.POPULATING;
}
};
}
};
}
开发者ID:neo4j-contrib,项目名称:neo4j-lucene5-index,代码行数:21,代码来源:LuceneIndexRecoveryIT.java
示例3: createLuceneIndexFactory
import org.neo4j.kernel.extension.KernelExtensionFactory; //导入依赖的package包/类
private KernelExtensionFactory<?> createLuceneIndexFactory()
{
return new KernelExtensionFactory<LuceneSchemaIndexProviderFactory.Dependencies>(
LuceneSchemaIndexProviderFactory.PROVIDER_DESCRIPTOR.getKey() )
{
@Override
public Lifecycle newInstance( KernelContext context, LuceneSchemaIndexProviderFactory.Dependencies dependencies )
throws Throwable
{
return new LuceneSchemaIndexProvider( fs.get(), ignoreCloseDirectoryFactory, context.storeDir() )
{
@Override
public int compareTo( SchemaIndexProvider o )
{
return 1;
}
};
}
};
}
开发者ID:neo4j-contrib,项目名称:neo4j-lucene5-index,代码行数:21,代码来源:LuceneIndexRecoveryIT.java
示例4: startInserter
import org.neo4j.kernel.extension.KernelExtensionFactory; //导入依赖的package包/类
@SuppressWarnings( { "rawtypes", "unchecked" } )
@Before
public void startInserter() throws Exception
{
storeDir = testDirectory.graphDbDir();
Iterable filteredKernelExtensions = filter( onlyRealLuceneExtensions(),
Service.load( KernelExtensionFactory.class ) );
inserter = BatchInserters.inserter( storeDir, stringMap(), filteredKernelExtensions );
}
开发者ID:neo4j-contrib,项目名称:neo4j-lucene5-index,代码行数:10,代码来源:TestLuceneBatchInsert.java
示例5: before
import org.neo4j.kernel.extension.KernelExtensionFactory; //导入依赖的package包/类
@Before
public void before()
{
List<KernelExtensionFactory<?>> extensionFactories = new ArrayList<>();
extensionFactories.add( kernelExtensionFactory );
extensionFactories.add(new LuceneLabelScanStoreExtension());
factory.setKernelExtensions( extensionFactories );
db = (GraphDatabaseAPI) factory.newEmbeddedDatabase( storeDir.absolutePath() );
}
开发者ID:neo4j-contrib,项目名称:neo4j-lucene5-index,代码行数:10,代码来源:UniqueIndexRecoveryTests.java
示例6: shouldCreateAndUpdateTimestamp
import org.neo4j.kernel.extension.KernelExtensionFactory; //导入依赖的package包/类
@Test
public void shouldCreateAndUpdateTimestamp() {
List<KernelExtensionFactory<?>> extensions = new ArrayList<KernelExtensionFactory<?>>(1);
extensions.add(new TimestampKernelExtensionFactory(true, false));
GraphDatabaseService graphdb = new GraphDatabaseFactory()
.addKernelExtensions(extensions)
.newEmbeddedDatabaseBuilder(TEST_DATA_STORE_DESTINATION)
.newGraphDatabase();
long createdNodeId = super.checkTimestampCreation(graphdb);
super.checkTimestampUpdateOnPropertyAdd(graphdb, createdNodeId);
super.checkTimestampUpdateOnRelationshipAdd(graphdb, createdNodeId);
}
开发者ID:ttiurani,项目名称:neo4j-timestamp,代码行数:14,代码来源:TimestampKernelExtensionTest.java
注:本文中的org.neo4j.kernel.extension.KernelExtensionFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论