Codota Logo
DataUtils.getPageType
Code IndexAdd Codota to your IDE (free)

How to use
getPageType
method
in
org.h2.mvstore.DataUtils

Best Java code snippets using org.h2.mvstore.DataUtils.getPageType (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: com.h2database/h2

/**
 * Only keep one reference to the same chunk. Only leaf references are
 * removed (references to inner nodes are not removed, as they could
 * indirectly point to other chunks).
 */
void removeDuplicateChunkReferences() {
  HashSet<Integer> chunks = new HashSet<>();
  // we don't need references to leaves in the same chunk
  chunks.add(DataUtils.getPageChunkId(pos));
  for (int i = 0; i < children.length; i++) {
    long p = children[i];
    int chunkId = DataUtils.getPageChunkId(p);
    boolean wasNew = chunks.add(chunkId);
    if (DataUtils.getPageType(p) == DataUtils.PAGE_TYPE_NODE) {
      continue;
    }
    if (wasNew) {
      continue;
    }
    removeChild(i--);
  }
}
origin: com.h2database/h2

int c = DataUtils.getPageChunkId(pos);
targetChunkSet.add(c);
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
  return;
origin: com.h2database/h2

if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
origin: com.h2database/h2

/**
 * Remove this page and all child pages.
 */
void removeAllRecursive() {
  if (children != null) {
    for (int i = 0, size = map.getChildPageCount(this); i < size; i++) {
      PageReference ref = children[i];
      if (ref.page != null) {
        ref.page.removeAllRecursive();
      } else {
        long c = children[i].pos;
        int type = DataUtils.getPageType(c);
        if (type == DataUtils.PAGE_TYPE_LEAF) {
          int mem = DataUtils.getPageMaxLength(c);
          map.removePage(c, mem);
        } else {
          map.readPage(c).removeAllRecursive();
        }
      }
    }
  }
  removePage();
}
origin: com.h2database/h2

for (int i = 0; i < getChildPageCount(p); i++) {
  long childPos = p.getChildPagePos(i);
  if (childPos != 0 && DataUtils.getPageType(childPos) == DataUtils.PAGE_TYPE_LEAF) {
origin: com.h2database/h2

private PageChildren readPageChunkReferences(int mapId, long pos, int parentChunk) {
  if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
    return null;
origin: com.h2database/h2-mvstore

/**
 * Only keep one reference to the same chunk. Only leaf references are
 * removed (references to inner nodes are not removed, as they could
 * indirectly point to other chunks).
 */
void removeDuplicateChunkReferences() {
  HashSet<Integer> chunks = new HashSet<>();
  // we don't need references to leaves in the same chunk
  chunks.add(DataUtils.getPageChunkId(pos));
  for (int i = 0; i < children.length; i++) {
    long p = children[i];
    int chunkId = DataUtils.getPageChunkId(p);
    boolean wasNew = chunks.add(chunkId);
    if (DataUtils.getPageType(p) == DataUtils.PAGE_TYPE_NODE) {
      continue;
    }
    if (wasNew) {
      continue;
    }
    removeChild(i--);
  }
}
origin: org.wowtools/h2

/**
 * Only keep one reference to the same chunk. Only leaf references are
 * removed (references to inner nodes are not removed, as they could
 * indirectly point to other chunks).
 */
void removeDuplicateChunkReferences() {
  HashSet<Integer> chunks = New.hashSet();
  // we don't need references to leaves in the same chunk
  chunks.add(DataUtils.getPageChunkId(pos));
  for (int i = 0; i < children.length; i++) {
    long p = children[i];
    int chunkId = DataUtils.getPageChunkId(p);
    boolean wasNew = chunks.add(chunkId);
    if (DataUtils.getPageType(p) == DataUtils.PAGE_TYPE_NODE) {
      continue;
    }
    if (wasNew) {
      continue;
    }
    removeChild(i--);
  }
}
origin: com.eventsourcing/h2

/**
 * Only keep one reference to the same chunk. Only leaf references are
 * removed (references to inner nodes are not removed, as they could
 * indirectly point to other chunks).
 */
void removeDuplicateChunkReferences() {
  HashSet<Integer> chunks = New.hashSet();
  // we don't need references to leaves in the same chunk
  chunks.add(DataUtils.getPageChunkId(pos));
  for (int i = 0; i < children.length; i++) {
    long p = children[i];
    int chunkId = DataUtils.getPageChunkId(p);
    boolean wasNew = chunks.add(chunkId);
    if (DataUtils.getPageType(p) == DataUtils.PAGE_TYPE_NODE) {
      continue;
    }
    if (wasNew) {
      continue;
    }
    removeChild(i--);
  }
}
origin: org.wowtools/h2

if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
origin: com.h2database/h2-mvstore

int c = DataUtils.getPageChunkId(pos);
targetChunkSet.add(c);
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
  return;
origin: com.h2database/h2-mvstore

if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
origin: com.eventsourcing/h2

if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
origin: com.eventsourcing/h2

int c = DataUtils.getPageChunkId(pos);
targetChunkSet.add(c);
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
  return;
origin: org.wowtools/h2

int c = DataUtils.getPageChunkId(pos);
targetChunkSet.add(c);
if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
  return;
origin: com.h2database/h2-mvstore

/**
 * Remove this page and all child pages.
 */
void removeAllRecursive() {
  if (children != null) {
    for (int i = 0, size = map.getChildPageCount(this); i < size; i++) {
      PageReference ref = children[i];
      if (ref.page != null) {
        ref.page.removeAllRecursive();
      } else {
        long c = children[i].pos;
        int type = DataUtils.getPageType(c);
        if (type == DataUtils.PAGE_TYPE_LEAF) {
          int mem = DataUtils.getPageMaxLength(c);
          map.removePage(c, mem);
        } else {
          map.readPage(c).removeAllRecursive();
        }
      }
    }
  }
  removePage();
}
origin: org.wowtools/h2

/**
 * Remove this page and all child pages.
 */
void removeAllRecursive() {
  if (children != null) {
    for (int i = 0, size = map.getChildPageCount(this); i < size; i++) {
      PageReference ref = children[i];
      if (ref.page != null) {
        ref.page.removeAllRecursive();
      } else {
        long c = children[i].pos;
        int type = DataUtils.getPageType(c);
        if (type == DataUtils.PAGE_TYPE_LEAF) {
          int mem = DataUtils.getPageMaxLength(c);
          map.removePage(c, mem);
        } else {
          map.readPage(c).removeAllRecursive();
        }
      }
    }
  }
  removePage();
}
origin: com.eventsourcing/h2

/**
 * Remove this page and all child pages.
 */
void removeAllRecursive() {
  if (children != null) {
    for (int i = 0, size = map.getChildPageCount(this); i < size; i++) {
      PageReference ref = children[i];
      if (ref.page != null) {
        ref.page.removeAllRecursive();
      } else {
        long c = children[i].pos;
        int type = DataUtils.getPageType(c);
        if (type == DataUtils.PAGE_TYPE_LEAF) {
          int mem = DataUtils.getPageMaxLength(c);
          map.removePage(c, mem);
        } else {
          map.readPage(c).removeAllRecursive();
        }
      }
    }
  }
  removePage();
}
origin: org.wowtools/h2

private PageChildren readPageChunkReferences(int mapId, long pos, int parentChunk) {
  if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
    return null;
origin: com.eventsourcing/h2

private PageChildren readPageChunkReferences(int mapId, long pos, int parentChunk) {
  if (DataUtils.getPageType(pos) == DataUtils.PAGE_TYPE_LEAF) {
    return null;
org.h2.mvstoreDataUtilsgetPageType

Javadoc

Get the page type from the position.

Popular methods of DataUtils

  • readVarInt
    Read a variable size int.
  • appendMap
    Append a map to the string builder, sorted by key.
  • checkArgument
    Throw an IllegalArgumentException if the argument is invalid.
  • copyExcept
    Copy the elements of an array, and remove one element.
  • copyWithGap
    Copy the elements of an array, with a gap.
  • encodeLength
    Convert the length to a length code 0..31. 31 means more than 1 MB.
  • formatMessage
    Format an error message.
  • getCheckValue
    Calculate a check value for the given integer. A check value is mean to verify the data is consisten
  • getErrorCode
    Get the error code from an exception message.
  • getFletcher32
    Calculate the Fletcher32 checksum.
  • getPageChunkId
    Get the chunk id from the position.
  • getPageMaxLength
    Get the maximum length for the given code. For the code 31, PAGE_LARGE is returned.
  • getPageChunkId,
  • getPageMaxLength,
  • getPageOffset,
  • getPagePos,
  • getVarIntLen,
  • initCause,
  • newIllegalArgumentException,
  • newIllegalStateException,
  • newUnsupportedOperationException

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • notifyDataSetChanged (ArrayAdapter)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Locale (java.util)
    A Locale object represents a specific geographical, political, or cultural region. An operation that
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • JList (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now