Package | Description |
---|---|
com.igormaznitsa.meta.common.exceptions | |
com.igormaznitsa.meta.common.interfaces | |
com.igormaznitsa.meta.common.utils |
Modifier and Type | Class and Description |
---|---|
class |
MetaErrorListeners
Service containing all error listeners for the common module methods and providing their notifications.
|
Modifier and Type | Method and Description |
---|---|
static void |
MetaErrorListeners.fireError(String text,
Throwable error)
Send notifications to all listeners.
|
void |
MetaErrorListener.onDetectedError(String text,
Throwable error)
The Method will be called if detected some error.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Disposable
Auxiliary interface describing disposable object.
|
Modifier and Type | Class and Description |
---|---|
class |
Assertions
Set of auxiliary methods for assertion.
|
class |
CallTrace
The Class allows to save stack trace history (it is possible to keep it in packed format) and restore it to text representation for request.
|
static class |
Deferrers.Deferred
Class wrapping executeDeferred method and stack depth for action.
|
class |
GetUtils
Auxiliary methods to get values.
|
static interface |
TimeGuard.TimeAlertListener
Interface for any object to be informed about time alerts.
|
Modifier and Type | Method and Description |
---|---|
static void |
TimeGuard.addGuard(String alertMessage,
long maxAllowedDelayInMilliseconds)
Add a time watcher.
|
static void |
TimeGuard.addGuard(String alertMessage,
long maxAllowedDelayInMilliseconds,
TimeGuard.TimeAlertListener timeAlertListener)
Add a time watcher and provide processor of time violation.
|
static void |
TimeGuard.addPoint(String timePointName,
TimeGuard.TimeAlertListener listener)
Add a named time point.
|
static void |
TimeGuard.cancel()
Cancel all time watchers and time points for the current stack level.
|
static void |
TimeGuard.cancelAll()
Cancel all time watchers and time points globally for the current thread.
|
static void |
Deferrers.cancelAllDeferredActionsGlobally()
Cancel all defer actions globally.
|
static void |
Deferrers.cancelDeferredActions()
Cancel all defer actions for the current stack depth.
|
static void |
TimeGuard.check()
Check all registered time watchers for time bound violations.
|
static void |
TimeGuard.checkPoint(String timePointName)
Check named time point(s).
|
static void |
TimeGuard.checkPoints()
Process all time points for the current stack level.
|
static Closeable |
IOUtils.closeQuetly(Closeable closeable)
Closing quetly any closeable object.
|
static Deferrers.Deferred |
Deferrers.defer(Deferrers.Deferred deferred)
Defer some action.
|
static Disposable |
Deferrers.defer(Disposable disposable)
Defer execution of some disposable object.
|
static Runnable |
Deferrers.defer(Runnable runnable)
Defer execution of some runnable action.
|
static <T extends Closeable> |
Deferrers.defer(T closeable)
Defer closing of an closeable object.
|
static <T> T |
Deferrers.deferredClose(T closeable)
Defer object containing public close() method.
|
static boolean |
Deferrers.isEmpty()
Check that presented defer actions for the current thread.
|
static boolean |
TimeGuard.isEmpty()
Check that the thread local for the current thread contains time points or watchers.
|
static <T> T[] |
ArrayUtils.joinArrays(T[]... arrays)
Join arrays provided as parameters, all arrays must be the same type, null values allowed.
|
static byte[] |
IOUtils.packData(byte[] data)
Pack some binary data.
|
static void |
Deferrers.processDeferredActions()
Process all defer actions for the current stack depth level.
|
static boolean |
ThreadUtils.silentSleep(long milliseconds)
Just suspend the current thread for defined interval in milliseconds.
|
static int |
ThreadUtils.stackDepth()
Get the stack call depth for the caller.
|
static StackTraceElement |
ThreadUtils.stackElement()
Get the stack element of the method caller.
|
static byte[] |
IOUtils.unpackData(byte[] data)
Unpack binary data packed by the packData method.
|
Constructor and Description |
---|
CallTrace(boolean skipConstructors,
boolean pack,
String eol)
The Constructor allows to create call trace history with defined end-of-line symbol and since needed stack item position.
|
Deferred()
The Constructor.
|
TimeData(int stackDepth,
String alertMessage,
long maxAllowedDelayInMilliseconds,
TimeGuard.TimeAlertListener violationListener)
The Constructor
|
Copyright © 2011–2021 Igor Maznitsa. All rights reserved.