public class Utils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Utils.SerializerType |
static class |
Utils.ServerState |
Modifier and Type | Field and Description |
---|---|
static int |
H_SIZE |
static int |
HEADER_SIZE |
static int |
LENGTH_OFFSET |
static int |
LENGTH_SIZE |
static int |
MAX_LEN |
static int |
OFFSET |
static int |
R_SIZE |
static byte |
SIGNATURE |
static int |
TOTAL |
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static Decoder |
createDecoder(Utils.SerializerType type) |
static Encoder |
createEncoder(Utils.SerializerType type) |
static long |
getDefaultNodeId() |
static int |
getIP(String host) |
static long |
getNodeId(String host) |
static String[] |
getOpts(String[] args,
String[] opts,
String[] defaults) |
static int |
getPID() |
static Client |
getTCPClient(String[] urlArray) |
static void |
help(String[] opts,
String[] defaults) |
static boolean |
isOverLoaded(ThreadPoolExecutor pools) |
static int |
match(String arg,
String[] opts) |
static byte[] |
response2Bytes(Response response) |
public static final int MAX_LEN
public static final byte SIGNATURE
public static final int HEADER_SIZE
public static final int LENGTH_OFFSET
public static final int LENGTH_SIZE
public static final int H_SIZE
public static final int R_SIZE
public static final int TOTAL
public static final int OFFSET
public static Decoder createDecoder(Utils.SerializerType type)
public static Encoder createEncoder(Utils.SerializerType type)
public static int getIP(String host)
host
- address as Stringpublic static int getPID()
public static long getDefaultNodeId()
public static long getNodeId(String host)
public static byte[] response2Bytes(Response response)
public static boolean isOverLoaded(ThreadPoolExecutor pools)
Copyright © 2016. All rights reserved.