WorkspaceHolder.getIndexResources
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.hibernate.search.backend.impl.lucene.WorkspaceHolder.getIndexResources(Showing top 10 results out of 315)

origin: hibernate/hibernate-search

public AbstractWorkspaceImpl extractWorkspace(IndexedTypeIdentifier indexedType) {
  DirectoryBasedIndexManager indexManager = (DirectoryBasedIndexManager) extractIndexManager( indexedType );
  WorkspaceHolder backend = indexManager.getWorkspaceHolder();
  return backend.getIndexResources().getWorkspace();
}
origin: org.infinispan/infinispan-query

  private void assertEfficientIndexingUsed(SearchIntegrator searchIntegrator, Class<?> clazz) {
   DirectoryBasedIndexManager im = (DirectoryBasedIndexManager) searchIntegrator.getIndexBindings().get(clazz)
      .getIndexManagerSelector().all().iterator().next();
   WorkspaceHolder workspaceHolder = im.getWorkspaceHolder();
   LuceneBackendResources indexResources = workspaceHolder.getIndexResources();
   IndexWorkVisitor<Void, LuceneWorkExecutor> visitor = indexResources.getWorkVisitor();
   assertTrue(TestingUtil.extractField(visitor, "updateExecutor") instanceof ByTermUpdateWorkExecutor);
  }
}
origin: hibernate/hibernate-search

private void assertExclusiveIsEnabled(IndexManagerHolder allIndexesManager, String indexName, boolean expectExclusive) {
  DirectoryBasedIndexManager indexManager = (DirectoryBasedIndexManager) allIndexesManager.getIndexManager( indexName );
  WorkspaceHolder workspaceHolder = indexManager.getWorkspaceHolder();
  AbstractWorkspaceImpl workspace = workspaceHolder.getIndexResources().getWorkspace();
  if ( expectExclusive ) {
    assertEquals( ExclusiveIndexWorkspaceImpl.class, workspace.getClass() );
  }
  else {
    assertEquals( SharedIndexWorkspaceImpl.class, workspace.getClass() );
  }
}
origin: hibernate/hibernate-search

protected static AbstractWorkspaceImpl extractWorkspace(MutableSearchFactory sf, Class<?> type) {
  EntityIndexBinding indexBindingForEntity = sf.getIndexBindings().get( type );
  DirectoryBasedIndexManager indexManager =
      (DirectoryBasedIndexManager) indexBindingForEntity.getIndexManagerSelector().all().iterator().next();
  WorkspaceHolder backend = (WorkspaceHolder) indexManager.getWorkspaceHolder();
  return backend.getIndexResources().getWorkspace();
}
origin: hibernate/hibernate-search

@Test
public void testNothingTest() {
  SearchIntegrator searchFactory = getSearchFactory().unwrap( SearchIntegrator.class );
  EntityIndexBinding indexBindingForEntity = searchFactory.getIndexBindings().get( Clock.class );
  Set<IndexManager> indexManagers = indexBindingForEntity.getIndexManagerSelector().all();
  assertEquals( 1, indexManagers.size() );
  DirectoryBasedIndexManager indexManager = (DirectoryBasedIndexManager) indexManagers.iterator().next();
  WorkspaceHolder backend = (WorkspaceHolder) indexManager.getWorkspaceHolder();
  assertEquals( 5, backend.getIndexResources().getMaxQueueLength() );
}
origin: hibernate/hibernate-search

/**
 * This essentially kills the backend: needed to release the IndexWriter lock
 * so that the CheckIndex task can be run.
 * You'll need to ignore further issues if indexing is attempted, and even shutdown
 * might not be graceful (the shutdown is not designed to be recoverable).
 */
private static void stopBackend(DirectoryBasedIndexManager directoryBasedIndexManager) {
  WorkspaceHolder backendQueueProcessor = (WorkspaceHolder) directoryBasedIndexManager.getWorkspaceHolder();
  backendQueueProcessor.getIndexResources().shutdown();
}
origin: hibernate/hibernate-search

IndexWriter writer = backendProcessor.getIndexResources().getWorkspace().getIndexWriter();
Document document = new Document();
document.add( new StringField( "id", "1", org.apache.lucene.document.Field.Store.NO ) );
origin: hibernate/hibernate-search

IndexWriter writer = backendProcessor.getIndexResources().getWorkspace().getIndexWriter();
Document document = new Document();
document.add( new StringField( "id", "1", org.apache.lucene.document.Field.Store.NO ) );
origin: infinispan/infinispan

  private void assertEfficientIndexingUsed(SearchIntegrator searchIntegrator, Class<?> clazz) {
   DirectoryBasedIndexManager im = (DirectoryBasedIndexManager) searchIntegrator.getIndexBindings().get(clazz)
      .getIndexManagerSelector().all().iterator().next();
   WorkspaceHolder workspaceHolder = im.getWorkspaceHolder();
   LuceneBackendResources indexResources = workspaceHolder.getIndexResources();
   IndexWorkVisitor<Void, LuceneWorkExecutor> visitor = indexResources.getWorkVisitor();
   assertTrue(TestingUtil.extractField(visitor, "updateExecutor") instanceof ByTermUpdateWorkExecutor);
  }
}
origin: org.infinispan/infinispan-query

  private void assertEfficientIndexingUsed(SearchIntegrator searchIntegrator, Class<?> clazz) {
   DirectoryBasedIndexManager im = (DirectoryBasedIndexManager) searchIntegrator.getIndexBindings().get(clazz)
      .getIndexManagerSelector().all().iterator().next();
   WorkspaceHolder workspaceHolder = im.getWorkspaceHolder();
   LuceneBackendResources indexResources = workspaceHolder.getIndexResources();
   IndexWorkVisitor<Void, LuceneWorkExecutor> visitor = indexResources.getWorkVisitor();
   assertTrue(TestingUtil.extractField(visitor, "updateExecutor") instanceof ByTermUpdateWorkExecutor);
  }
}
org.hibernate.search.backend.impl.luceneWorkspaceHoldergetIndexResources

Popular methods of WorkspaceHolder

  • <init>
  • applyStreamWork
  • applyWork
  • initialize
  • close
  • flushAndReleaseResources
  • getExclusiveWriteLock
  • indexMappingChanged
  • setCustomWorkspace
    If invoked before #initialize(Properties,WorkerBuildContext,IndexManager)it can set a customized Wor

Popular classes and methods

  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • File (java.io)
    LocalStorage based File implementation for GWT. Should probably have used Harmony as a starting poin
  • PrintStream (java.io)
    Wraps an existing OutputStream and provides convenience methods for writing common data types in a h
  • RandomAccessFile (java.io)
    Saves binary data to the local storage; currently using hex encoding. The string is prefixed with "h
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)