Package org.apache.ignite.internal.util
Class IgniteExceptionRegistry
- java.lang.Object
-
- org.apache.ignite.internal.util.IgniteExceptionRegistry
-
public class IgniteExceptionRegistry extends Object
Utility to collect suppressed errors within internal code.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIgniteExceptionRegistry.ExceptionInfoDetailed info about suppressed error.
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_QUEUE_SIZE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longerrorCount()Errors count.static IgniteExceptionRegistryget()List<IgniteExceptionRegistry.ExceptionInfo>getErrors(long order)Gets suppressed errors.voidonException(String msg, Throwable e)Puts exception into queue.voidprintErrors(IgniteLogger log)Prints errors.voidsetMaxSize(int maxSize)Sets max size.
-
-
-
Field Detail
-
DEFAULT_QUEUE_SIZE
public static final int DEFAULT_QUEUE_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static IgniteExceptionRegistry get()
- Returns:
- Registry instance.
-
onException
public void onException(String msg, Throwable e)
Puts exception into queue. Thread-safe.- Parameters:
msg- Message that describe reason why error was suppressed.e- Exception.
-
getErrors
public List<IgniteExceptionRegistry.ExceptionInfo> getErrors(long order)
Gets suppressed errors.- Parameters:
order- Order number to filter errors.- Returns:
- List of exceptions that happened after specified order.
-
setMaxSize
public void setMaxSize(int maxSize)
Sets max size. Default valueDEFAULT_QUEUE_SIZE- Parameters:
maxSize- Max size.
-
printErrors
public void printErrors(IgniteLogger log)
Prints errors.- Parameters:
log- Logger.
-
errorCount
public long errorCount()
Errors count.- Returns:
- Errors count.
-
-