Tabnine Logo
DataUtils.parseMap
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.h2database/h2

@SuppressWarnings({ "unchecked", "rawtypes" })
public static Builder fromString(String s) {
  // Cast from HashMap<String, String> to HashMap<String, Object> is safe
  return new Builder((HashMap) DataUtils.parseMap(s));
}
origin: com.h2database/h2

/**
 * Build a block from the given string.
 *
 * @param s the string
 * @return the block
 */
public static Chunk fromString(String s) {
  HashMap<String, String> map = DataUtils.parseMap(s);
  int id = DataUtils.readHexInt(map, "chunk", 0);
  Chunk c = new Chunk(id);
  c.block = DataUtils.readHexLong(map, "block", 0);
  c.len = DataUtils.readHexInt(map, "len", 0);
  c.pageCount = DataUtils.readHexInt(map, "pages", 0);
  c.pageCountLive = DataUtils.readHexInt(map, "livePages", c.pageCount);
  c.mapId = DataUtils.readHexInt(map, "map", 0);
  c.maxLen = DataUtils.readHexLong(map, "max", 0);
  c.maxLenLive = DataUtils.readHexLong(map, "liveMax", c.maxLen);
  c.metaRootPos = DataUtils.readHexLong(map, "root", 0);
  c.time = DataUtils.readHexLong(map, "time", 0);
  c.unused = DataUtils.readHexLong(map, "unused", 0);
  c.version = DataUtils.readHexLong(map, "version", id);
  c.next = DataUtils.readHexLong(map, "next", 0);
  return c;
}
origin: org.wowtools/h2

/**
 * Read the configuration from a string.
 *
 * @param s the string representation
 * @return the builder
 */
public static Builder fromString(String s) {
  HashMap<String, String> config = DataUtils.parseMap(s);
  Builder builder = new Builder();
  builder.config.putAll(config);
  return builder;
}
origin: com.h2database/h2-mvstore

@SuppressWarnings({ "unchecked", "rawtypes" })
public static Builder fromString(String s) {
  // Cast from HashMap<String, String> to HashMap<String, Object> is safe
  return new Builder((HashMap) DataUtils.parseMap(s));
}
origin: com.eventsourcing/h2

/**
 * Read the configuration from a string.
 *
 * @param s the string representation
 * @return the builder
 */
public static Builder fromString(String s) {
  HashMap<String, String> config = DataUtils.parseMap(s);
  Builder builder = new Builder();
  builder.config.putAll(config);
  return builder;
}
origin: org.wowtools/h2

/**
 * Get the name of the given map.
 *
 * @param id the map id
 * @return the name, or null if not found
 */
public synchronized String getMapName(int id) {
  checkOpen();
  String m = meta.get(MVMap.getMapKey(id));
  return m == null ? null : DataUtils.parseMap(m).get("name");
}
origin: com.eventsourcing/h2

/**
 * Get the name of the given map.
 *
 * @param id the map id
 * @return the name, or null if not found
 */
public synchronized String getMapName(int id) {
  checkOpen();
  String m = meta.get(MVMap.getMapKey(id));
  return m == null ? null : DataUtils.parseMap(m).get("name");
}
origin: com.eventsourcing/h2

lastBlock.get(buff);
String s = new String(buff, DataUtils.LATIN).trim();
HashMap<String, String> m = DataUtils.parseMap(s);
int check = DataUtils.readHexInt(m, "fletcher", 0);
m.remove("fletcher");
origin: org.wowtools/h2

lastBlock.get(buff);
String s = new String(buff, DataUtils.LATIN).trim();
HashMap<String, String> m = DataUtils.parseMap(s);
int check = DataUtils.readHexInt(m, "fletcher", 0);
m.remove("fletcher");
origin: com.eventsourcing/h2

String config = meta.get(MVMap.getMapKey(id));
c = New.hashMap();
c.putAll(DataUtils.parseMap(config));
c.put("id", id);
map.init(this, c);
origin: org.wowtools/h2

String config = meta.get(MVMap.getMapKey(id));
c = New.hashMap();
c.putAll(DataUtils.parseMap(config));
c.put("id", id);
map.init(this, c);
origin: org.wowtools/h2

String s = new String(buff, 0, BLOCK_SIZE,
    DataUtils.LATIN).trim();
HashMap<String, String> m = DataUtils.parseMap(s);
int blockSize = DataUtils.readHexInt(
    m, "blockSize", BLOCK_SIZE);
origin: com.eventsourcing/h2

String s = new String(buff, 0, BLOCK_SIZE,
    DataUtils.LATIN).trim();
HashMap<String, String> m = DataUtils.parseMap(s);
int blockSize = DataUtils.readHexInt(
    m, "blockSize", BLOCK_SIZE);
origin: com.h2database/h2-mvstore

/**
 * Build a block from the given string.
 *
 * @param s the string
 * @return the block
 */
public static Chunk fromString(String s) {
  HashMap<String, String> map = DataUtils.parseMap(s);
  int id = DataUtils.readHexInt(map, "chunk", 0);
  Chunk c = new Chunk(id);
  c.block = DataUtils.readHexLong(map, "block", 0);
  c.len = DataUtils.readHexInt(map, "len", 0);
  c.pageCount = DataUtils.readHexInt(map, "pages", 0);
  c.pageCountLive = DataUtils.readHexInt(map, "livePages", c.pageCount);
  c.mapId = DataUtils.readHexInt(map, "map", 0);
  c.maxLen = DataUtils.readHexLong(map, "max", 0);
  c.maxLenLive = DataUtils.readHexLong(map, "liveMax", c.maxLen);
  c.metaRootPos = DataUtils.readHexLong(map, "root", 0);
  c.time = DataUtils.readHexLong(map, "time", 0);
  c.unused = DataUtils.readHexLong(map, "unused", 0);
  c.version = DataUtils.readHexLong(map, "version", id);
  c.next = DataUtils.readHexLong(map, "next", 0);
  return c;
}
origin: org.wowtools/h2

/**
 * Build a block from the given string.
 *
 * @param s the string
 * @return the block
 */
public static Chunk fromString(String s) {
  HashMap<String, String> map = DataUtils.parseMap(s);
  int id = DataUtils.readHexInt(map, "chunk", 0);
  Chunk c = new Chunk(id);
  c.block = DataUtils.readHexLong(map, "block", 0);
  c.len = DataUtils.readHexInt(map, "len", 0);
  c.pageCount = DataUtils.readHexInt(map, "pages", 0);
  c.pageCountLive = DataUtils.readHexInt(map, "livePages", c.pageCount);
  c.mapId = DataUtils.readHexInt(map, "map", 0);
  c.maxLen = DataUtils.readHexLong(map, "max", 0);
  c.maxLenLive = DataUtils.readHexLong(map, "liveMax", c.maxLen);
  c.metaRootPos = DataUtils.readHexLong(map, "root", 0);
  c.time = DataUtils.readHexLong(map, "time", 0);
  c.unused = DataUtils.readHexLong(map, "unused", 0);
  c.version = DataUtils.readHexLong(map, "version", id);
  c.next = DataUtils.readHexLong(map, "next", 0);
  return c;
}
origin: com.eventsourcing/h2

/**
 * Build a block from the given string.
 *
 * @param s the string
 * @return the block
 */
public static Chunk fromString(String s) {
  HashMap<String, String> map = DataUtils.parseMap(s);
  int id = DataUtils.readHexInt(map, "chunk", 0);
  Chunk c = new Chunk(id);
  c.block = DataUtils.readHexLong(map, "block", 0);
  c.len = DataUtils.readHexInt(map, "len", 0);
  c.pageCount = DataUtils.readHexInt(map, "pages", 0);
  c.pageCountLive = DataUtils.readHexInt(map, "livePages", c.pageCount);
  c.mapId = DataUtils.readHexInt(map, "map", 0);
  c.maxLen = DataUtils.readHexLong(map, "max", 0);
  c.maxLenLive = DataUtils.readHexLong(map, "liveMax", c.maxLen);
  c.metaRootPos = DataUtils.readHexLong(map, "root", 0);
  c.time = DataUtils.readHexLong(map, "time", 0);
  c.unused = DataUtils.readHexLong(map, "unused", 0);
  c.version = DataUtils.readHexLong(map, "version", id);
  c.next = DataUtils.readHexLong(map, "next", 0);
  return c;
}
org.h2.mvstoreDataUtilsparseMap

Javadoc

Parse a key-value pair list.

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,
  • getPageType,
  • getVarIntLen,
  • initCause,
  • newIllegalArgumentException,
  • newIllegalStateException,
  • newUnsupportedOperationException

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • addToBackStack (FragmentTransaction)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Permission (java.security)
    Legacy security code; do not use.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • From CI to AI: The AI layer in your organization
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