congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
RangeCache.getRange
Code IndexAdd Tabnine to your IDE (free)

How to use
getRange
method
in
org.apache.bookkeeper.mledger.util.RangeCache

Best Java code snippets using org.apache.bookkeeper.mledger.util.RangeCache.getRange (Showing top 4 results out of 315)

origin: apache/pulsar

Collection<EntryImpl> cachedEntries = entries.getRange(firstPosition, lastPosition);
origin: apache/pulsar

@Test
void getRange() {
  RangeCache<Integer, RefString> cache = new RangeCache<>();
  cache.put(0, new RefString("0"));
  cache.put(1, new RefString("1"));
  cache.put(3, new RefString("3"));
  cache.put(5, new RefString("5"));
  assertEquals(cache.getRange(1, 8),
      Lists.newArrayList(new RefString("1"), new RefString("3"), new RefString("5")));
  cache.put(8, new RefString("8"));
  assertEquals(cache.getRange(1, 8),
      Lists.newArrayList(new RefString("1"), new RefString("3"), new RefString("5"), new RefString("8")));
  cache.clear();
  assertEquals(cache.getSize(), 0);
  assertEquals(cache.getNumberOfEntries(), 0);
}
origin: com.yahoo.pulsar/managed-ledger

Collection<EntryImpl> cachedEntries = entries.getRange(firstPosition, lastPosition);
origin: org.apache.pulsar/managed-ledger-original

Collection<EntryImpl> cachedEntries = entries.getRange(firstPosition, lastPosition);
org.apache.bookkeeper.mledger.utilRangeCachegetRange

Popular methods of RangeCache

  • <init>
    Construct a new RangeLruCache.
  • clear
    Remove all the entries from the cache.
  • evictLeastAccessedEntries
  • get
  • getSize
  • put
    Insert.
  • removeRange
  • getNumberOfEntries
    Just for testing. Getting the number of entries is very expensive on the conncurrent map

Popular in Java

  • Making http requests using okhttp
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Path (java.nio.file)
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • JButton (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ 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