Package io.netty.handler.codec.redis
Class FixedRedisMessagePool
- java.lang.Object
-
- io.netty.handler.codec.redis.FixedRedisMessagePool
-
- All Implemented Interfaces:
RedisMessagePool
@UnstableApi public final class FixedRedisMessagePool extends java.lang.Object implements RedisMessagePool
A default fixed redis message pool.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFixedRedisMessagePool.RedisErrorKeystatic classFixedRedisMessagePool.RedisReplyKey
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<ByteBuf,ErrorRedisMessage>byteBufToErrorsprivate java.util.Map<ByteBuf,IntegerRedisMessage>byteBufToIntegersprivate java.util.Map<ByteBuf,SimpleStringRedisMessage>byteBufToSimpleStringsstatic FixedRedisMessagePoolINSTANCEA shared object forFixedRedisMessagePool.private java.util.Map<FixedRedisMessagePool.RedisErrorKey,ErrorRedisMessage>keyToErrorsprivate java.util.Map<FixedRedisMessagePool.RedisReplyKey,SimpleStringRedisMessage>keyToSimpleStringsprivate LongObjectMap<byte[]>longToByteBufsprivate LongObjectMap<IntegerRedisMessage>longToIntegersprivate static longMAX_CACHED_INTEGER_NUMBERprivate static longMIN_CACHED_INTEGER_NUMBERprivate static intSIZE_CACHED_INTEGER_NUMBERprivate java.util.Map<java.lang.String,ErrorRedisMessage>stringToErrorsprivate java.util.Map<java.lang.String,SimpleStringRedisMessage>stringToSimpleStrings
-
Constructor Summary
Constructors Modifier Constructor Description privateFixedRedisMessagePool()Creates aFixedRedisMessagePoolinstance.
-
Method Summary
-
-
-
Field Detail
-
MIN_CACHED_INTEGER_NUMBER
private static final long MIN_CACHED_INTEGER_NUMBER
- See Also:
- Constant Field Values
-
MAX_CACHED_INTEGER_NUMBER
private static final long MAX_CACHED_INTEGER_NUMBER
- See Also:
- Constant Field Values
-
SIZE_CACHED_INTEGER_NUMBER
private static final int SIZE_CACHED_INTEGER_NUMBER
- See Also:
- Constant Field Values
-
INSTANCE
public static final FixedRedisMessagePool INSTANCE
A shared object forFixedRedisMessagePool.
-
byteBufToSimpleStrings
private final java.util.Map<ByteBuf,SimpleStringRedisMessage> byteBufToSimpleStrings
-
stringToSimpleStrings
private final java.util.Map<java.lang.String,SimpleStringRedisMessage> stringToSimpleStrings
-
keyToSimpleStrings
private final java.util.Map<FixedRedisMessagePool.RedisReplyKey,SimpleStringRedisMessage> keyToSimpleStrings
-
byteBufToErrors
private final java.util.Map<ByteBuf,ErrorRedisMessage> byteBufToErrors
-
stringToErrors
private final java.util.Map<java.lang.String,ErrorRedisMessage> stringToErrors
-
keyToErrors
private final java.util.Map<FixedRedisMessagePool.RedisErrorKey,ErrorRedisMessage> keyToErrors
-
byteBufToIntegers
private final java.util.Map<ByteBuf,IntegerRedisMessage> byteBufToIntegers
-
longToIntegers
private final LongObjectMap<IntegerRedisMessage> longToIntegers
-
longToByteBufs
private final LongObjectMap<byte[]> longToByteBufs
-
-
Constructor Detail
-
FixedRedisMessagePool
private FixedRedisMessagePool()
Creates aFixedRedisMessagePoolinstance.
-
-
Method Detail
-
getSimpleString
public SimpleStringRedisMessage getSimpleString(java.lang.String content)
Description copied from interface:RedisMessagePool- Specified by:
getSimpleStringin interfaceRedisMessagePool
-
getSimpleString
public SimpleStringRedisMessage getSimpleString(FixedRedisMessagePool.RedisReplyKey key)
ReturnsSimpleStringRedisMessagefor the givenFixedRedisMessagePool.RedisReplyKeyornullif it does not exist.
-
getSimpleString
public SimpleStringRedisMessage getSimpleString(ByteBuf content)
Description copied from interface:RedisMessagePool- Specified by:
getSimpleStringin interfaceRedisMessagePool
-
getError
public ErrorRedisMessage getError(java.lang.String content)
Description copied from interface:RedisMessagePool- Specified by:
getErrorin interfaceRedisMessagePool
-
getError
public ErrorRedisMessage getError(FixedRedisMessagePool.RedisErrorKey key)
ReturnsErrorRedisMessagefor the givenFixedRedisMessagePool.RedisErrorKeyornullif it does not exist.
-
getError
public ErrorRedisMessage getError(ByteBuf content)
Description copied from interface:RedisMessagePool- Specified by:
getErrorin interfaceRedisMessagePool
-
getInteger
public IntegerRedisMessage getInteger(long value)
Description copied from interface:RedisMessagePool- Specified by:
getIntegerin interfaceRedisMessagePool
-
getInteger
public IntegerRedisMessage getInteger(ByteBuf content)
Description copied from interface:RedisMessagePool- Specified by:
getIntegerin interfaceRedisMessagePool
-
getByteBufOfInteger
public byte[] getByteBufOfInteger(long value)
Description copied from interface:RedisMessagePoolReturnsbyte[]for givenmsg. Returnsnullit does not exist.- Specified by:
getByteBufOfIntegerin interfaceRedisMessagePool
-
-