Package org.apache.storm.utils
Class Utils
- java.lang.Object
-
- org.apache.storm.utils.Utils
-
public final class Utils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_STREAM_ID
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Objectdeserialize(byte[] serialized)static <S,T>
Tget(Map<S,T> m, S key, T defaultValue)static booleangetBoolean(Object o, boolean defaultValue)static IntegergetInt(Object o)static ObjectnewInstance(String klass)static Map<String,String>readCommandLineOpts()static byte[]serialize(Object obj)static voidsleep(long millis)static byte[]toByteArray(ByteBuffer buffer)static List<Object>tuple(Object... values)
-
-
-
Field Detail
-
DEFAULT_STREAM_ID
public static final String DEFAULT_STREAM_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
sleep
public static void sleep(long millis)
-
serialize
public static byte[] serialize(Object obj)
-
deserialize
public static Object deserialize(byte[] serialized)
-
getBoolean
public static boolean getBoolean(Object o, boolean defaultValue)
-
toByteArray
public static byte[] toByteArray(ByteBuffer buffer)
-
get
public static <S,T> T get(Map<S,T> m, S key, T defaultValue)
-
-