/** {@inheritDoc} */ @Override protected void printPage(long addr, int pageSize, GridStringBuilder sb) throws IgniteCheckedException { sb.a("BPlusIO [\n\tcanGetRow=").a(canGetRow) .a(",\n\tleaf=").a(leaf) .a(",\n\titemSize=").a(itemSize) .a(",\n\tcnt=").a(getCount(addr)) .a(",\n\tforward=").appendHex(getForward(addr)) .a(",\n\tremoveId=").appendHex(getRemoveId(addr)) .a("\n]"); }
/** {@inheritDoc} */ @Override protected void printPage(long addr, int pageSize, GridStringBuilder sb) throws IgniteCheckedException { sb.a("PageMeta[\n\ttreeRoot=").a(getReuseListRoot(addr)) .a(",\n\tlastSuccessfulFullSnapshotId=").a(getLastSuccessfulFullSnapshotId(addr)) .a(",\n\tlastSuccessfulSnapshotId=").a(getLastSuccessfulSnapshotId(addr)) .a(",\n\tnextSnapshotTag=").a(getNextSnapshotTag(addr)) .a(",\n\tlastSuccessfulSnapshotTag=").a(getLastSuccessfulSnapshotTag(addr)) .a(",\n\tlastAllocatedPageCount=").a(getLastAllocatedPageCount(addr)) .a(",\n\tcandidatePageCount=").a(getCandidatePageCount(addr)) .a("\n]"); } }
/** * Writes overflow message to buffer if needed. * * @param buf String builder buffer. * @param size Size to compare with limit. */ private static void handleOverflow(SBLimitedLength buf, int size) { int overflow = size - COLLECTION_LIMIT; if (overflow > 0) buf.a("... and ").a(overflow).a(" more"); }
/** {@inheritDoc} */ @Override protected void printPage(long pageAddr, int pageSize, GridStringBuilder sb) throws IgniteCheckedException { super.printPage(pageAddr, pageSize, sb); byte state = getPartitionState(pageAddr); sb.a(",\nPagePartitionMeta[\n\tsize=").a(getSize(pageAddr)) .a(",\n\tupdateCounter=").a(getUpdateCounter(pageAddr)) .a(",\n\tglobalRemoveId=").a(getGlobalRemoveId(pageAddr)) .a(",\n\tpartitionState=").a(state).a("(").a(GridDhtPartitionState.fromOrdinal(state)).a(")") .a(",\n\tcountersPageId=").a(getCountersPageId(pageAddr)) .a("\n]"); } }
/** * Creates String key used for equality and hashing. */ private String createEqualityKey() { GridStringBuilder sb = new GridStringBuilder("(").a(usr).a(")@"); if (uri.getScheme() != null) sb.a(uri.getScheme().toLowerCase()); sb.a("://"); if (uri.getAuthority() != null) sb.a(uri.getAuthority().toLowerCase()); return sb.toString(); }
/** * @param segment Segment index. * @return Segment file name. */ public static String fileName(long segment) { SB b = new SB(); String segmentStr = Long.toString(segment); for (int i = segmentStr.length(); i < WAL_SEGMENT_FILE_NAME_LENGTH; i++) b.a('0'); b.a(segmentStr).a(WAL_SEGMENT_FILE_EXT); return b.toString(); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(char[] str, int offset, int len) { if (lenLimit.overflowed(this)) { tail.append(Arrays.copyOfRange(str, offset, len)); return this; } int curLen = length(); super.a(str, offset, len); return onWrite(curLen); }
/** * Short node representation. * * @param ns Grid nodes. * @return Short string representing the node. */ public static String toShortString(Collection<? extends ClusterNode> ns) { SB sb = new SB("Grid nodes [cnt=" + ns.size()); for (ClusterNode n : ns) sb.a(", ").a(toShortString(n)); return sb.a(']').toString(); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(String str) { if (lenLimit.overflowed(this)) { tail.append(str); return this; } int curLen = length(); super.a(str); return onWrite(curLen); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(char c) { if (lenLimit.overflowed(this)) { tail.append(c); return this; } int curLen = length(); super.a(c); return onWrite(curLen); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(char[] str) { if (lenLimit.overflowed(this)) { tail.append(str); return this; } int curLen = length(); super.a(str); return onWrite(curLen); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(boolean b) { if (lenLimit.overflowed(this)) { tail.append(b); return this; } int curLen = length(); super.a(b); return onWrite(curLen); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(long lng) { if (lenLimit.overflowed(this)) { tail.append(lng); return this; } int curLen = length(); super.a(lng); return onWrite(curLen); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(double d) { if (lenLimit.overflowed(this)) { tail.append(d); return this; } int curLen = length(); super.a(d); return onWrite(curLen); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(StringBuffer sb) { if (lenLimit.overflowed(this)) { tail.append(sb); return this; } int curLen = length(); super.a(sb); return onWrite(curLen); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(CharSequence s) { if (lenLimit.overflowed(this)) { tail.append(s); return this; } int curLen = length(); super.a(s); return onWrite(curLen); }
/** {@inheritDoc} */ @Override public GridStringBuilder a(float f) { if (lenLimit.overflowed(this)) { tail.append(f); return this; } int curLen = length(); super.a(f); return onWrite(curLen); }