/** * Returns a string identifying this synchronizer's state. The state, in * brackets, includes the String {@code "State="} followed by the current * value of {@link #getState}. * * @return a string identifying the state of this synchronizer */ @Override public final String toString() { final StringBuilder sb = new StringBuilder(this.getClass().getSimpleName()) .append('@').append(Integer.toHexString(System.identityHashCode(this))) .append('('); appendFieldsToString(sb); return sb.append(')').toString(); }
public StringBuilder shortToString(final StringBuilder sb) { ArrayUtils.objectRefString(this, sb); sb.append("(key=").append(getRawKey()).append("; rawValue="); // OFFHEAP _getValue ok: the current toString on OffHeapCachedDeserializable // is safe to use without incing refcount. ArrayUtils.objectRefString(_getValue(), sb); return super.appendFieldsToString(sb.append("; ")).append(')'); }
@Override protected StringBuilder appendFieldsToString(final StringBuilder sb) { sb.append("key=").append(getRawKey()).append(";rawValue="); // OFFHEAP _getValue ok: the current toString on OffHeapCachedDeserializable // is safe to use without incing refcount. ArrayUtils.objectStringNonRecursive(_getValue(), sb); VersionStamp stamp = getVersionStamp(); if (stamp != null) { sb.append(";version=").append(stamp.asVersionTag()) .append(";member=").append(stamp.getMemberID()); } return super.appendFieldsToString(sb.append(";")); }