congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
DirectoryLoaderAdaptor.loadAllEntries
Code IndexAdd Tabnine to your IDE (free)

How to use
loadAllEntries
method
in
org.infinispan.lucene.cacheloader.DirectoryLoaderAdaptor

Best Java code snippets using org.infinispan.lucene.cacheloader.DirectoryLoaderAdaptor.loadAllEntries (Showing top 3 results out of 315)

origin: org.infinispan/infinispan-embedded-query

 @Override
 public Void call() throws Exception {
   try {
    final HashSet<MarshalledEntry> allInternalEntries = new HashSet<>();
    dir.loadAllEntries(allInternalEntries, Integer.MAX_VALUE, ctx.getMarshaller());
    for (MarshalledEntry me : allInternalEntries) {
      if (taskContext.isStopped())
       break;
      if (filter == null || filter.accept(me.getKey())) {
       task.processEntry(me, taskContext);
      }
    }
    return null;
   }
   catch (Exception e) {
    log.errorExecutingParallelStoreTask(e);
    throw e;
   }
 }
});
origin: org.infinispan/infinispan-lucene-v3

 @Override
 public Void call() throws Exception {
   try {
    final HashSet<MarshalledEntry> allInternalEntries = new HashSet<MarshalledEntry>();
    dir.loadAllEntries(allInternalEntries, Integer.MAX_VALUE, ctx.getMarshaller());
    for (MarshalledEntry me : allInternalEntries) {
      if (taskContext.isStopped())
       break;
      if (filter == null || filter.shouldLoadKey(me.getKey())) {
       task.processEntry(me, taskContext);
      }
    }
    return null;
   }
   catch (Exception e) {
    log.errorExecutingParallelStoreTask(e);
    throw e;
   }
 }
});
origin: org.infinispan/infinispan-lucene-directory

@Override
public Publisher<MarshalledEntry<K, V>> publishEntries(Predicate<? super K> filter, boolean fetchValue, boolean fetchMetadata) {
 return Flowable.defer(() -> {
   // Make sure that we update directories before we start iterating upon directories
   scanForUnknownDirectories();
   return Flowable.fromIterable(openDirectories.values());
 })
    // We parallelize this since the loading below is blocking
    .parallel()
    .runOn(Schedulers.from(ctx.getExecutor()))
    .flatMap(dir -> {
      final Set<MarshalledEntry<K, V>> allInternalEntries = new HashSet<>();
      dir.loadAllEntries(allInternalEntries, Integer.MAX_VALUE, ctx.getMarshaller());
      return Flowable.fromIterable(allInternalEntries);
    })
    .filter(me -> filter == null || filter.test(me.getKey()))
    .sequential();
}
org.infinispan.lucene.cacheloaderDirectoryLoaderAdaptorloadAllEntries

Javadoc

Loads all "entries" from the CacheLoader; considering this is actually a Lucene index, that's going to transform segments in entries in a specific order, simplest entries first.

Popular methods of DirectoryLoaderAdaptor

  • <init>
    Create a new DirectoryLoaderAdaptor.
  • figureChunksNumber
    Index segment files might be larger than 2GB; so it's possible to have an autoChunksize which is too
  • load
    Load the value for a specific key
  • close
    Closes the underlying Directory. After it's closed, no other invocations are expected on this Adapte
  • containsKey
  • containsKeyIntern
    ContainsKey implementation for chunk elements
  • loadSomeKeys
    Load some keys in the collector, excluding some and to a maximum number of collected (non-excluded)

Popular in Java

  • Updating database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now