yarn.sharedcache.checksum.algo.impl
)
@return SharedCacheChecksum
object]]>
Note that header and ellipses are not counted against {@link #limit}.
An example:
{@code // At the beginning it's an empty string final Appendable shortAppender = new BoundedAppender(80); // The whole message fits into limit shortAppender.append( "message1 this is a very long message but fitting into limit\n"); // The first message is truncated, the second not shortAppender.append("message2 this is shorter than the previous one\n"); // The first message is deleted, the second truncated, the third // preserved shortAppender.append("message3 this is even shorter message, maybe.\n"); // The first two are deleted, the third one truncated, the last preserved shortAppender.append("message4 the shortest one, yet the greatest :)"); // Current contents are like this: // Diagnostic messages truncated, showing last 80 chars out of 199: // ...s is even shorter message, maybe. // message4 the shortest one, yet the greatest :) }
Note that null values are {@link #append(CharSequence) append}ed just like in {@link StringBuilder#append(CharSequence) original implementation}.
Note that this class is not thread safe.]]>