Tabnine Logo
CacheLongKeyLIRS.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
org.h2.mvstore.cache.CacheLongKeyLIRS

Best Java code snippets using org.h2.mvstore.cache.CacheLongKeyLIRS.get (Showing top 13 results out of 315)

origin: com.h2database/h2

int len = CACHE_BLOCK_SIZE - off;
len = Math.min(len, dst.remaining());
ByteBuffer buff = cache.get(cachePos);
if (buff == null) {
  buff = ByteBuffer.allocate(CACHE_BLOCK_SIZE);
origin: com.h2database/h2

  r = cacheChunkRef.get(pos);
} else {
  r = null;
    Page p = cache.get(pos);
    if (p != null) {
      r = new PageChildren(p);
origin: com.h2database/h2

/**
 * Read a page.
 *
 * @param map the map
 * @param pos the page position
 * @return the page
 */
Page readPage(MVMap<?, ?> map, long pos) {
  if (pos == 0) {
    throw DataUtils.newIllegalStateException(
        DataUtils.ERROR_FILE_CORRUPT, "Position 0");
  }
  Page p = cache == null ? null : cache.get(pos);
  if (p == null) {
    Chunk c = getChunk(pos);
    long filePos = c.block * BLOCK_SIZE;
    filePos += DataUtils.getPageOffset(pos);
    if (filePos < 0) {
      throw DataUtils.newIllegalStateException(
          DataUtils.ERROR_FILE_CORRUPT,
          "Negative position {0}", filePos);
    }
    long maxPos = (c.block + c.len) * BLOCK_SIZE;
    p = Page.read(fileStore, pos, map, filePos, maxPos);
    cachePage(pos, p, p.getMemory());
  }
  return p;
}
origin: com.eventsourcing/h2

int len = CACHE_BLOCK_SIZE - off;
len = Math.min(len, dst.remaining());
ByteBuffer buff = cache.get(cachePos);
if (buff == null) {
  buff = ByteBuffer.allocate(CACHE_BLOCK_SIZE);
origin: com.h2database/h2-mvstore

int len = CACHE_BLOCK_SIZE - off;
len = Math.min(len, dst.remaining());
ByteBuffer buff = cache.get(cachePos);
if (buff == null) {
  buff = ByteBuffer.allocate(CACHE_BLOCK_SIZE);
origin: org.wowtools/h2

int len = CACHE_BLOCK_SIZE - off;
len = Math.min(len, dst.remaining());
ByteBuffer buff = cache.get(cachePos);
if (buff == null) {
  buff = ByteBuffer.allocate(CACHE_BLOCK_SIZE);
origin: org.gridgain/gridgain-indexing

  /** {@inheritDoc} */
  @Override public GridH2KeyValueRowOffheap createPointer(long ptr) {
    GridH2KeyValueRowOffheap row = rowCache.get(ptr);
    if (row != null) {
      assert row.pointer() == ptr : ptr + " " + row.pointer();
      return row;
    }
    return new GridH2KeyValueRowOffheap(this, ptr);
  }
}
origin: org.wowtools/h2

  r = cacheChunkRef.get(pos);
} else {
  r = null;
    Page p = cache.get(pos);
    if (p != null) {
      r = new PageChildren(p);
origin: com.eventsourcing/h2

  r = cacheChunkRef.get(pos);
} else {
  r = null;
    Page p = cache.get(pos);
    if (p != null) {
      r = new PageChildren(p);
origin: com.h2database/h2-mvstore

  r = cacheChunkRef.get(pos);
} else {
  r = null;
    Page p = cache.get(pos);
    if (p != null) {
      r = new PageChildren(p);
origin: com.h2database/h2-mvstore

/**
 * Read a page.
 *
 * @param map the map
 * @param pos the page position
 * @return the page
 */
Page readPage(MVMap<?, ?> map, long pos) {
  if (pos == 0) {
    throw DataUtils.newIllegalStateException(
        DataUtils.ERROR_FILE_CORRUPT, "Position 0");
  }
  Page p = cache == null ? null : cache.get(pos);
  if (p == null) {
    Chunk c = getChunk(pos);
    long filePos = c.block * BLOCK_SIZE;
    filePos += DataUtils.getPageOffset(pos);
    if (filePos < 0) {
      throw DataUtils.newIllegalStateException(
          DataUtils.ERROR_FILE_CORRUPT,
          "Negative position {0}", filePos);
    }
    long maxPos = (c.block + c.len) * BLOCK_SIZE;
    p = Page.read(fileStore, pos, map, filePos, maxPos);
    cachePage(pos, p, p.getMemory());
  }
  return p;
}
origin: org.wowtools/h2

/**
 * Read a page.
 *
 * @param map the map
 * @param pos the page position
 * @return the page
 */
Page readPage(MVMap<?, ?> map, long pos) {
  if (pos == 0) {
    throw DataUtils.newIllegalStateException(
        DataUtils.ERROR_FILE_CORRUPT, "Position 0");
  }
  Page p = cache == null ? null : cache.get(pos);
  if (p == null) {
    Chunk c = getChunk(pos);
    long filePos = c.block * BLOCK_SIZE;
    filePos += DataUtils.getPageOffset(pos);
    if (filePos < 0) {
      throw DataUtils.newIllegalStateException(
          DataUtils.ERROR_FILE_CORRUPT,
          "Negative position {0}", filePos);
    }
    long maxPos = (c.block + c.len) * BLOCK_SIZE;
    p = Page.read(fileStore, pos, map, filePos, maxPos);
    cachePage(pos, p, p.getMemory());
  }
  return p;
}
origin: com.eventsourcing/h2

/**
 * Read a page.
 *
 * @param map the map
 * @param pos the page position
 * @return the page
 */
Page readPage(MVMap<?, ?> map, long pos) {
  if (pos == 0) {
    throw DataUtils.newIllegalStateException(
        DataUtils.ERROR_FILE_CORRUPT, "Position 0");
  }
  Page p = cache == null ? null : cache.get(pos);
  if (p == null) {
    Chunk c = getChunk(pos);
    long filePos = c.block * BLOCK_SIZE;
    filePos += DataUtils.getPageOffset(pos);
    if (filePos < 0) {
      throw DataUtils.newIllegalStateException(
          DataUtils.ERROR_FILE_CORRUPT,
          "Negative position {0}", filePos);
    }
    long maxPos = (c.block + c.len) * BLOCK_SIZE;
    p = Page.read(fileStore, pos, map, filePos, maxPos);
    cachePage(pos, p, p.getMemory());
  }
  return p;
}
org.h2.mvstore.cacheCacheLongKeyLIRSget

Javadoc

Get the value for the given key if the entry is cached. This method adjusts the internal state of the cache sometimes, to ensure commonly used entries stay in the cache.

Popular methods of CacheLongKeyLIRS

  • <init>
    Create a new cache with the given memory size.
  • clear
    Remove all entries.
  • getMaxMemory
    Get the maximum memory to use.
  • getUsedMemory
    Get the currently used memory.
  • put
    Add an entry to the cache. The entry may or may not exist in the cache yet. This method will usually
  • remove
    Remove an entry. Both resident and non-resident entries can be removed.
  • find
  • getHash
    Get the hash code for the given key. The hash code is further enhanced to spread the values more eve
  • getMap
    Convert this cache to a map.
  • getSegment
  • getSegmentIndex
  • keySet
    Get the set of keys for resident entries.
  • getSegmentIndex,
  • keySet,
  • resizeIfNeeded,
  • setMaxMemory,
  • size,
  • sizeOf,
  • getMaxItemSize

Popular in Java

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JTable (javax.swing)
  • 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