1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package io.netty.handler.codec.redis;
17
18 import io.netty.util.internal.SystemPropertyUtil;
19
20
21
22
23 final class RedisConstants {
24
25 private RedisConstants() {
26 }
27
28 static final int TYPE_LENGTH = 1;
29
30 static final int EOL_LENGTH = 2;
31
32 static final int NULL_LENGTH = 2;
33
34 static final int NULL_VALUE = -1;
35
36 static final int REDIS_MESSAGE_MAX_LENGTH = 512 * 1024 * 1024;
37
38
39 static final int REDIS_INLINE_MESSAGE_MAX_LENGTH = 64 * 1024;
40
41 static final int POSITIVE_LONG_MAX_LENGTH = 19;
42
43 static final int LONG_MAX_LENGTH = POSITIVE_LONG_MAX_LENGTH + 1;
44
45 static final short NULL_SHORT = RedisCodecUtil.makeShort('-', '1');
46
47 static final short EOL_SHORT = RedisCodecUtil.makeShort('\r', '\n');
48
49 static final String PROP_REDIS_MAX_ARRAY_LENGTH = "io.netty.handler.codec.redis.maxArrayLength";
50 static final int REDIS_MAX_ARRAY_LENGTH = SystemPropertyUtil.getInt(PROP_REDIS_MAX_ARRAY_LENGTH, 1000000);
51 }