@UnstableApi public final class FixedRedisMessagePool extends java.lang.Object implements RedisMessagePool
| Modifier and Type | Field and Description |
|---|---|
private java.util.Map<ByteBuf,ErrorRedisMessage> |
byteBufToErrors |
private java.util.Map<ByteBuf,IntegerRedisMessage> |
byteBufToIntegers |
private java.util.Map<ByteBuf,SimpleStringRedisMessage> |
byteBufToSimpleStrings |
private static java.lang.String[] |
DEFAULT_ERRORS |
private static java.lang.String[] |
DEFAULT_SIMPLE_STRINGS |
static FixedRedisMessagePool |
INSTANCE
A shared object for
FixedRedisMessagePool. |
private LongObjectMap<byte[]> |
longToByteBufs |
private LongObjectMap<IntegerRedisMessage> |
longToIntegers |
private static long |
MAX_CACHED_INTEGER_NUMBER |
private static long |
MIN_CACHED_INTEGER_NUMBER |
private static int |
SIZE_CACHED_INTEGER_NUMBER |
private java.util.Map<java.lang.String,ErrorRedisMessage> |
stringToErrors |
private java.util.Map<java.lang.String,SimpleStringRedisMessage> |
stringToSimpleStrings |
| Modifier | Constructor and Description |
|---|---|
private |
FixedRedisMessagePool()
Creates a
FixedRedisMessagePool instance. |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getByteBufOfInteger(long value)
Returns
byte[] for given msg. |
ErrorRedisMessage |
getError(ByteBuf content)
Returns
ErrorRedisMessage for given content. |
ErrorRedisMessage |
getError(java.lang.String content)
Returns
ErrorRedisMessage for given content. |
IntegerRedisMessage |
getInteger(ByteBuf content)
Returns
IntegerRedisMessage for given content. |
IntegerRedisMessage |
getInteger(long value)
Returns
IntegerRedisMessage for given value. |
SimpleStringRedisMessage |
getSimpleString(ByteBuf content)
Returns
SimpleStringRedisMessage for given content. |
SimpleStringRedisMessage |
getSimpleString(java.lang.String content)
Returns
SimpleStringRedisMessage for given content. |
private static final java.lang.String[] DEFAULT_SIMPLE_STRINGS
private static final java.lang.String[] DEFAULT_ERRORS
private static final long MIN_CACHED_INTEGER_NUMBER
private static final long MAX_CACHED_INTEGER_NUMBER
private static final int SIZE_CACHED_INTEGER_NUMBER
public static final FixedRedisMessagePool INSTANCE
FixedRedisMessagePool.private final java.util.Map<ByteBuf,SimpleStringRedisMessage> byteBufToSimpleStrings
private final java.util.Map<java.lang.String,SimpleStringRedisMessage> stringToSimpleStrings
private final java.util.Map<ByteBuf,ErrorRedisMessage> byteBufToErrors
private final java.util.Map<java.lang.String,ErrorRedisMessage> stringToErrors
private final java.util.Map<ByteBuf,IntegerRedisMessage> byteBufToIntegers
private final LongObjectMap<IntegerRedisMessage> longToIntegers
private final LongObjectMap<byte[]> longToByteBufs
private FixedRedisMessagePool()
FixedRedisMessagePool instance.public SimpleStringRedisMessage getSimpleString(java.lang.String content)
RedisMessagePoolgetSimpleString in interface RedisMessagePoolpublic SimpleStringRedisMessage getSimpleString(ByteBuf content)
RedisMessagePoolgetSimpleString in interface RedisMessagePoolpublic ErrorRedisMessage getError(java.lang.String content)
RedisMessagePoolgetError in interface RedisMessagePoolpublic ErrorRedisMessage getError(ByteBuf content)
RedisMessagePoolgetError in interface RedisMessagePoolpublic IntegerRedisMessage getInteger(long value)
RedisMessagePoolgetInteger in interface RedisMessagePoolpublic IntegerRedisMessage getInteger(ByteBuf content)
RedisMessagePoolgetInteger in interface RedisMessagePoolpublic byte[] getByteBufOfInteger(long value)
RedisMessagePoolbyte[] for given msg. Returns null it does not exist.getByteBufOfInteger in interface RedisMessagePool