public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); if (splited.length == 3) { // ELEMENT <bkey> <bytes> this.subkey = BTreeUtil.hexStringToByteArrays(splited[1].substring(2)); this.dataLength = Integer.parseInt(splited[2]); this.eflag = null; } else if (splited.length == 4) { // ELEMENT <bkey> <eflag> <bytes> this.subkey = BTreeUtil.hexStringToByteArrays(splited[1].substring(2)); this.eflag = BTreeUtil.hexStringToByteArrays(splited[2].substring(2)); this.dataLength = Integer.parseInt(splited[3]); } }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); if (splited.length == 3) { // ELEMENT <bkey> <bytes> this.subkey = Long.parseLong(splited[1]); this.dataLength = Integer.parseInt(splited[2]); this.eflag = null; } else if (splited.length == 4) { // ELEMENT <bkey> <eflag> <bytes> this.subkey = Long.parseLong(splited[1]); this.eflag = BTreeUtil.hexStringToByteArrays(splited[2].substring(2)); this.dataLength = Integer.parseInt(splited[3]); } }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); /* with flag VALUE 1 SMGetTest31 0 0x01 0x45464C4147 6 VALUE1 MISSED_KEYS 0 END without flag VALUE 1 SMGetTest31 0 0x01 6 VALUE1 MISSED_KEYS 0 END */ this.key = splited[0]; this.flag = Integer.parseInt(splited[1]); this.subkey = BTreeUtil.hexStringToByteArrays(splited[2].substring(2)); if (splited[3].startsWith("0x")) { this.eflag = BTreeUtil.hexStringToByteArrays(splited[3].substring(2)); this.dataLength = Integer.parseInt(splited[4]); } else { this.eflag = null; this.dataLength = Integer.parseInt(splited[3]); } } }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); /* with flag VALUE 1 SMGetTest31 0 0x01 0x45464C4147 6 VALUE1 MISSED_KEYS 0 END without flag VALUE 1 SMGetTest31 0 0x01 6 VALUE1 MISSED_KEYS 0 END */ this.key = splited[0]; this.flag = Integer.parseInt(splited[1]); this.subkey = BTreeUtil.hexStringToByteArrays(splited[2].substring(2)); if (splited[3].startsWith("0x")) { this.eflag = BTreeUtil.hexStringToByteArrays(splited[3].substring(2)); this.dataLength = Integer.parseInt(splited[4]); } else { this.eflag = null; this.dataLength = Integer.parseInt(splited[3]); } } }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); /* with flag VALUE 1 SMGetTest31 0 1 0x45464C4147 6 VALUE1 MISSED_KEYS 0 END without flag VALUE 1 SMGetTest31 0 1 6 VALUE1 MISSED_KEYS 0 END */ this.key = splited[0]; this.flag = Integer.parseInt(splited[1]); this.subkey = Long.parseLong(splited[2]); if (splited[3].startsWith("0x")) { this.eflag = BTreeUtil.hexStringToByteArrays(splited[3].substring(2)); this.dataLength = Integer.parseInt(splited[4]); } else { this.eflag = null; this.dataLength = Integer.parseInt(splited[3]); } } }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); /* with flag VALUE 1 SMGetTest31 0 1 0x45464C4147 6 VALUE1 MISSED_KEYS 0 END without flag VALUE 1 SMGetTest31 0 1 6 VALUE1 MISSED_KEYS 0 END */ this.key = splited[0]; this.flag = Integer.parseInt(splited[1]); this.subkey = Long.parseLong(splited[2]); if (splited[3].startsWith("0x")) { this.eflag = BTreeUtil.hexStringToByteArrays(splited[3].substring(2)); this.dataLength = Integer.parseInt(splited[4]); } else { this.eflag = null; this.dataLength = Integer.parseInt(splited[3]); } } }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); if (headerParseStep == 1) { // found bkey if (splited[0].startsWith("0x")) { this.subkey = splited[0].substring(2); } else { this.subkey = splited[0]; } // found element flag. if (splited[1].startsWith("0x")) { this.elementFlagExists = true; this.elementFlag = BTreeUtil.hexStringToByteArrays(splited[1].substring(2)); //this.headerCount++; headerParseStep = 2; } else { this.dataLength = Integer.parseInt(splited[1]); } } else { this.headerParseStep = 1; this.dataLength = Integer.parseInt(splited[1]); } } }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); // <bkey> if (splited[0].startsWith("0x")) { this.bkey = new BKeyObject(splited[0].substring(2)); } else { this.bkey = new BKeyObject(Long.parseLong(splited[0])); } if (splited[1].startsWith("0x")) { // <eflag> <bytes> this.eflag = BTreeUtil.hexStringToByteArrays(splited[1].substring(2)); this.bytes = Integer.parseInt(splited[2]); } else { // <bytes> only this.bytes = Integer.parseInt(splited[1]); } this.dataLength = bytes; }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); boolean hasEFlag = false; // <bkey> if (splited[BKEY].startsWith("0x")) { this.bkeyObject = new BKeyObject(splited[0].substring(2)); } else { this.bkeyObject = new BKeyObject(Long.parseLong(splited[0])); } // <eflag> or <bytes> if (splited[EFLAG_OR_BYTES].startsWith("0x")) { // <eflag> hasEFlag = true; this.elementFlag = BTreeUtil .hexStringToByteArrays(splited[EFLAG_OR_BYTES].substring(2)); } else { this.bytes = Integer.parseInt(splited[EFLAG_OR_BYTES]); } // <bytes> if (hasEFlag) { this.bytes = Integer.parseInt(splited[BYTES]); } }
public BKeyObject(String bkeyString) { byte[] b = BTreeUtil.hexStringToByteArrays(bkeyString); ByteArrayBKey byteArrayBKey = new ByteArrayBKey(b); setByteArrayBKey(byteArrayBKey); }
public void decodeItemHeader(String itemHeader) { String[] splited = itemHeader.split(" "); boolean hasEFlag = false; // <bkey> if (splited[BKEY].startsWith("0x")) { this.bkey = new BKeyObject(splited[0].substring(2)); } else { this.bkey = new BKeyObject(Long.parseLong(splited[0])); } // <eflag> or <bytes> if (splited[EFLAG_OR_BYTES].startsWith("0x")) { // <eflag> hasEFlag = true; this.eflag = BTreeUtil .hexStringToByteArrays(splited[EFLAG_OR_BYTES].substring(2)); } else { this.bytes = Integer.parseInt(splited[EFLAG_OR_BYTES]); } // <bytes> if (hasEFlag) { this.bytes = Integer.parseInt(splited[BYTES]); } this.dataLength = bytes; }
} else if ("maxbkeyrange".equals(name)) { if (value.startsWith("0x")) { maxBkeyRangeByBytes = BTreeUtil.hexStringToByteArrays(value.substring(2)); } else { maxBkeyRange = Long.parseLong(value); if (!value.startsWith("-1")) { if (value.startsWith("0x")) { minBkeyByBytes = BTreeUtil.hexStringToByteArrays(value .substring(2)); } else { if (!value.startsWith("-1")) { if (value.startsWith("0x")) { maxBkeyByBytes = BTreeUtil.hexStringToByteArrays(value .substring(2)); } else {
public void gotData(String key, String subkey, int flags, byte[] data) { assert key.equals(k) : "Wrong key returned"; byte[] bkey = BTreeUtil.hexStringToByteArrays(subkey); Element<T> element = new Element<T>(bkey, tc .decode(new CachedData(flags, data, tc .getMaxSize())), collectionGet.getElementFlag()); map.put(new ByteArrayBKey(bkey), element); } });
((BTreeSortMergeGetOperation.Callback) getCallback()) .gotTrimmedKey(chunk[0], BTreeUtil.hexStringToByteArrays(chunk[1].substring(2))); count++; } else {