congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
DataUtils.getPageType
Code IndexAdd Tabnine 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)

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

  • Finding current android device location
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • setRequestProperty (URLConnection)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • 14 Best Plugins for Eclipse
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