public class CacheKeyBuilder extends Object
Cacheable objects.
The layout of the serialized cache key is like below.
+--------------------------------------------------------+
| ID (1 byte) |
| type key (1 byte) | serialized value (variable length) |
| type key (1 byte) | serialized value (variable length) |
| ... |
+--------------------------------------------------------+| Constructor and Description |
|---|
CacheKeyBuilder(byte id) |
public CacheKeyBuilder appendByte(byte input)
public CacheKeyBuilder appendByteArray(byte[] input)
public CacheKeyBuilder appendString(@Nullable String input)
public CacheKeyBuilder appendStrings(Collection<String> input)
input - a collection of strings to be included in the cache keypublic CacheKeyBuilder appendStringsIgnoringOrder(Collection<String> input)
input - a collection of strings to be included in the cache keypublic CacheKeyBuilder appendBoolean(boolean input)
public CacheKeyBuilder appendInt(int input)
public CacheKeyBuilder appendLong(long input)
public CacheKeyBuilder appendFloat(float input)
public CacheKeyBuilder appendDouble(double input)
public CacheKeyBuilder appendDoubleArray(double[] input)
public CacheKeyBuilder appendFloatArray(float[] input)
public CacheKeyBuilder appendCacheable(@Nullable Cacheable input)
public CacheKeyBuilder appendCacheables(Collection<? extends Cacheable> input)
input - a collection of Cacheables to be included in the cache keypublic CacheKeyBuilder appendCacheablesIgnoringOrder(Collection<? extends Cacheable> input)
input - a collection of Cacheables to be included in the cache keypublic byte[] build()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.