| Modifier and Type | Field and Description |
|---|---|
static ScheduledThreadPoolExecutor |
EXECUTOR |
static String |
OS_NAME |
static Mapper<Object,Object> |
TRANSFORM_TO_SIMPLE_CLASS_NAME |
| Modifier and Type | Method and Description |
|---|---|
static String |
annotations(Class<? extends Annotation>[] annotations) |
static void |
append(StringBuilder sb,
String separator,
String value) |
static void |
benchmark(String name,
int count,
BenchmarkOperation operation) |
static void |
benchmark(String name,
int count,
Runnable runnable) |
static void |
benchmarkComplete(String name,
int count,
long startTime) |
static void |
benchmarkMT(int threadsN,
String name,
int count,
BenchmarkOperation operation) |
static void |
benchmarkMT(int threadsN,
String name,
int count,
CountDownLatch outsideLatch,
BenchmarkOperation operation) |
static void |
benchmarkMT(int threadsN,
String name,
int count,
Runnable runnable) |
static int |
bitMask(int bits) |
static boolean |
bootService(Config config,
String service) |
static int |
bytesToInt(String s) |
static long |
bytesToLong(String s) |
static short |
bytesToShort(String s) |
static UUID |
bytesToUUID(byte[] bytes) |
static <K,V> Map<K,V> |
cast(Map<?,?> map) |
static String |
classes(List<Class<?>> classes) |
static String |
classNames(List<String> classes) |
static int |
countNonNull(Object... values) |
static Object[] |
deleteAt(Object[] arr,
int index) |
static Object |
deserialize(byte[] buf) |
static Object |
deserialize(ByteBuffer buf) |
static String |
detectZipRoot(InputStream zip) |
static void |
doBenchmark(String name,
int count,
BenchmarkOperation operation,
boolean silent) |
static boolean |
dockerized() |
static void |
dockerized(boolean dockerized) |
static <T> T |
dynamic(Class<T> targetInterface,
Dynamic dynamic) |
static void |
endMeasure() |
static void |
endMeasure(long count,
String info) |
static void |
endMeasure(String info) |
static String |
errorMsg(Throwable error) |
static boolean |
exists(Callable<?> accessChain) |
static <T> T[] |
expand(T[] arr,
int factor) |
static <T> T[] |
expand(T[] arr,
T item) |
static String |
fileSizeReadable(long size) |
static String |
fileSizeReadable(String filename) |
static String |
fillIn(String template,
Object... namesAndValues) |
static String |
fillIn(String template,
String placeholder,
String value) |
static void |
filterAndInvokeMainClasses(Object[] beans,
Set<Class<?>> invoked) |
static Class<?> |
getCallingClass(Class<?>... ignoreClasses) |
static Class<?> |
getCallingMainClass() |
static String |
getCallingPackage(Class<?>... ignoreClasses) |
static ErrCodeAndMsg |
getErrorCodeAndMsg(Throwable err) |
static List<?> |
getPage(Iterable<?> items,
int page,
int pageSize,
Integer size,
BoolWrap isLastPage) |
static Method |
getTestMethodIfExists() |
static String |
http() |
static String |
id() |
static int |
intFrom(byte a,
byte b,
byte c,
byte d) |
static void |
invokeMain(Class<?> clazz,
String[] args) |
static boolean |
isAppResource(String filename) |
static boolean |
isArray(Object value) |
static boolean |
isAscii(String s) |
static boolean |
isDev() |
static boolean |
isInsideTest() |
static boolean |
isMavenBuild() |
static boolean |
isPlatform() |
static boolean |
isSilent() |
static boolean |
isSpecialArg(String arg) |
static boolean |
isValidationError(Throwable error) |
static String |
javaVersion() |
static void |
joinThread(Thread thread) |
static RapidoidThreadLocals |
locals() |
static int |
log2(int n) |
static void |
logProperties(Properties props) |
static void |
logSection(String msg) |
static RapidoidThread |
loop(Runnable loop) |
static <T> Map<String,T> |
lowercase(Map<String,T> map) |
static boolean |
matchingProfile(Class<?> clazz) |
static Object |
maybeMasked(Object value) |
static void |
multiThreaded(int threadsN,
Mapper<Integer,Void> executable) |
static void |
multiThreaded(int threadsN,
Runnable executable) |
static <T> T |
normalOrHeavy(T normal,
T heavy) |
static <T> List<T> |
page(Iterable<T> items,
int page,
int pageSize) |
static Map<String,String> |
parseArgs(List<String> args) |
static String |
path(String... parts) |
static void |
printRapidoidBanner() |
static int |
processId() |
static String |
processName() |
static <T> Map<String,T> |
protectSensitiveInfo(Map<String,T> data,
T replacement) |
static String |
refinePath(String path) |
static void |
reset() |
static Throwable |
rootCause(Throwable e) |
static byte |
sbyte(int n) |
static String |
semiSpecialUri(String... suffixes) |
static boolean |
sensitiveKey(String key) |
static <T extends Serializable> |
serializable(Object value) |
static byte[] |
serialize(Object value) |
static void |
serialize(Object value,
ByteBuffer buf) |
static void |
setMavenBuild(boolean mavenBuild) |
static void |
setPlatform(boolean platform) |
static short |
shortFrom(byte a,
byte b) |
static void |
sortByOrder(List<Method> methods) |
static String |
specialUri(String... suffixes) |
static String |
specialUriPrefix() |
static String |
stackTraceOf(Throwable e) |
static void |
startMeasure() |
static void |
terminate() |
static void |
terminate(int afterSeconds) |
static void |
terminateIfIdleFor(int idleSeconds) |
static String |
textToId(String s) |
static Thread |
thread(Runnable runnable) |
static boolean |
timedOut(long since,
long timeout) |
static byte[] |
toBytes(Object obj) |
static int |
toInt(long value) |
static int |
ubyte(byte b) |
static void |
unzip(InputStream zip,
String destFolder) |
static String |
uri(String... parts) |
static String |
urlDecode(String value) |
static String |
urlDecodeOrKeepOriginal(String s) |
static String |
urlEncode(String value) |
static String |
urlWithProtocol(String url) |
static byte[] |
uuidToBytes(UUID uuid) |
static boolean |
waitInterruption(long millis) |
static void |
watchForChanges(String path,
Operation<String> changeListener) |
static boolean |
withWatchModule() |
public static final String OS_NAME
public static final ScheduledThreadPoolExecutor EXECUTOR
public static byte[] serialize(Object value)
public static Object deserialize(byte[] buf)
public static void serialize(Object value, ByteBuffer buf)
public static Object deserialize(ByteBuffer buf)
public static short bytesToShort(String s)
public static int bytesToInt(String s)
public static long bytesToLong(String s)
public static int intFrom(byte a,
byte b,
byte c,
byte d)
public static short shortFrom(byte a,
byte b)
public static boolean waitInterruption(long millis)
public static void joinThread(Thread thread)
public static void benchmark(String name, int count, BenchmarkOperation operation)
public static void doBenchmark(String name, int count, BenchmarkOperation operation, boolean silent)
public static void benchmarkComplete(String name, int count, long startTime)
public static void benchmarkMT(int threadsN,
String name,
int count,
CountDownLatch outsideLatch,
BenchmarkOperation operation)
public static void benchmarkMT(int threadsN,
String name,
int count,
BenchmarkOperation operation)
public static void startMeasure()
public static void endMeasure()
public static void endMeasure(String info)
public static void endMeasure(long count,
String info)
public static void multiThreaded(int threadsN,
Runnable executable)
public static void append(StringBuilder sb, String separator, String value)
public static <T extends Serializable> T serializable(Object value)
public static RapidoidThread loop(Runnable loop)
public static Class<?> getCallingMainClass()
public static byte[] toBytes(Object obj)
public static boolean isArray(Object value)
public static <T> T[] expand(T[] arr,
int factor)
public static <T> T[] expand(T[] arr,
T item)
public static boolean exists(Callable<?> accessChain)
public static int countNonNull(Object... values)
public static boolean withWatchModule()
public static void terminate(int afterSeconds)
public static void terminateIfIdleFor(int idleSeconds)
public static void terminate()
public static byte sbyte(int n)
public static int ubyte(byte b)
public static void logSection(String msg)
public static void logProperties(Properties props)
public static boolean isValidationError(Throwable error)
public static List<?> getPage(Iterable<?> items, int page, int pageSize, Integer size, BoolWrap isLastPage)
public static void filterAndInvokeMainClasses(Object[] beans, Set<Class<?>> invoked)
public static String annotations(Class<? extends Annotation>[] annotations)
public static <T> Map<String,T> protectSensitiveInfo(Map<String,T> data, T replacement)
public static boolean sensitiveKey(String key)
public static int processId()
public static String processName()
public static String javaVersion()
public static boolean matchingProfile(Class<?> clazz)
public static boolean isInsideTest()
public static void reset()
public static boolean isAscii(String s)
public static RapidoidThreadLocals locals()
public static boolean dockerized()
public static void dockerized(boolean dockerized)
public static String id()
public static boolean isSpecialArg(String arg)
public static boolean isDev()
public static String fileSizeReadable(long size)
public static byte[] uuidToBytes(UUID uuid)
public static UUID bytesToUUID(byte[] bytes)
public static <T> T normalOrHeavy(T normal,
T heavy)
public static Method getTestMethodIfExists()
public static void setPlatform(boolean platform)
public static boolean isPlatform()
public static boolean isMavenBuild()
public static void setMavenBuild(boolean mavenBuild)
public static ErrCodeAndMsg getErrorCodeAndMsg(Throwable err)
public static String detectZipRoot(InputStream zip)
public static void unzip(InputStream zip, String destFolder)
public static void printRapidoidBanner()
public static boolean isSilent()
public static String specialUriPrefix()
public static String http()
public static boolean timedOut(long since,
long timeout)
public static int log2(int n)
public static int bitMask(int bits)
public static boolean isAppResource(String filename)
public static int toInt(long value)
Copyright © 2014–2018 Nikolche Mihajlovski and contributors. All rights reserved.