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
`static class` `IgniteExceptionRegistry.ExceptionInfo` Detailed info about suppressed error.

### Field Summary

Fields
`static int` `DEFAULT_QUEUE_SIZE`

### Method Summary

Methods
`long` `errorCount()` Errors count.
`static IgniteExceptionRegistry` `get()`
`List<IgniteExceptionRegistry.ExceptionInfo>` `getErrors(long order)` Gets suppressed errors.
`void` `onException(String msg, Throwable e)` Puts exception into queue.
`void` `printErrors(IgniteLogger log)` Prints errors.
`void` `setMaxSize(int maxSize)` Sets max size.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 value `DEFAULT_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.

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.9.0
Release Date | : March 2 2017