Tabnine Logo
DirectoryLoaderAdaptor.loadSomeKeys
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.infinispan/infinispan-lucene-v3

/**
* @param keysCollector the Set where to add loaded keys to
* @param keysToExclude Could be null!
* @throws org.infinispan.persistence.spi.PersistenceException
*/
protected void loadAllKeys(final HashSet<IndexScopedKey> keysCollector, final Set<IndexScopedKey> keysToExclude) {
 loadSomeKeys(keysCollector, keysToExclude, Integer.MAX_VALUE);
}
origin: org.infinispan/infinispan-lucene-v3

/**
* 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.
*
* @param entriesCollector loaded entries are collected in this set
* @param maxEntries to limit amount of entries loaded
* @throws PersistenceException
*/
protected void loadAllEntries(final HashSet<MarshalledEntry> entriesCollector, final int maxEntries, StreamingMarshaller marshaller) {
 int existingElements = entriesCollector.size();
 int toLoadElements = maxEntries - existingElements;
 if (toLoadElements <= 0) {
   return;
 }
 HashSet<IndexScopedKey> keysCollector = new HashSet<IndexScopedKey>();
 loadSomeKeys(keysCollector, Collections.EMPTY_SET, toLoadElements);
 for (IndexScopedKey key : keysCollector) {
   Object value = load(key);
   if (value != null) {
    MarshalledEntry cacheEntry = new MarshalledEntryImpl(key, value, null, marshaller);
    entriesCollector.add(cacheEntry);
   }
 }
}
origin: org.infinispan/infinispan-lucene-directory

/**
* 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.
*
* @param entriesCollector loaded entries are collected in this set
* @param maxEntries to limit amount of entries loaded
*/
protected <K, V> void loadAllEntries(final Set<MarshalledEntry<K, V>> entriesCollector, final int maxEntries, StreamingMarshaller marshaller) {
 int existingElements = entriesCollector.size();
 int toLoadElements = maxEntries - existingElements;
 if (toLoadElements <= 0) {
   return;
 }
 HashSet<IndexScopedKey> keysCollector = new HashSet<>();
 loadSomeKeys(keysCollector, Collections.EMPTY_SET, toLoadElements);
 for (IndexScopedKey key : keysCollector) {
   Object value = load(key);
   if (value != null) {
    MarshalledEntry cacheEntry = new MarshalledEntryImpl(key, value, null, marshaller);
    entriesCollector.add(cacheEntry);
   }
 }
}
origin: org.infinispan/infinispan-embedded-query

/**
* 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.
*
* @param entriesCollector loaded entries are collected in this set
* @param maxEntries to limit amount of entries loaded
*/
protected void loadAllEntries(final HashSet<MarshalledEntry> entriesCollector, final int maxEntries, StreamingMarshaller marshaller) {
 int existingElements = entriesCollector.size();
 int toLoadElements = maxEntries - existingElements;
 if (toLoadElements <= 0) {
   return;
 }
 HashSet<IndexScopedKey> keysCollector = new HashSet<>();
 loadSomeKeys(keysCollector, Collections.EMPTY_SET, toLoadElements);
 for (IndexScopedKey key : keysCollector) {
   Object value = load(key);
   if (value != null) {
    MarshalledEntry cacheEntry = new MarshalledEntryImpl(key, value, null, marshaller);
    entriesCollector.add(cacheEntry);
   }
 }
}
org.infinispan.lucene.cacheloaderDirectoryLoaderAdaptorloadSomeKeys

Javadoc

Load some keys in the collector, excluding some and to a maximum number of collected (non-excluded) keys.

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
  • loadAllEntries
    Loads all "entries" from the CacheLoader; considering this is actually a Lucene index, that's going

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Runner (org.openjdk.jmh.runner)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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