net.snowflake.client.core

## Class EventUtil

- java.lang.Object
- - net.snowflake.client.core.EventUtil

    public class EventUtil
    extends Object

Utility class to encapsulate support information pertaining to the EventHandler and events.

Author:
  jrosen

### Field Summary

Fields
`static String` `DUMP_PATH_PROP`
`static String` `DUMP_SIZE_PROP`
`static String` `DUMP_SUBDIR`

### Constructor Summary

Constructors
Constructor and Description
`EventUtil()`

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `getDumpFileId()`
`static String` `getDumpPathPrefix()`
`static EventHandler` `getEventHandlerInstance()`
`static long` `getmaxDumpFileSizeBytes()`
`static void` `initEventHandlerInstance(int maxEntries, int flushPeriodMs)` Initializes the common eventHandler instance for all sessions/threads
`static void` `triggerBasicEvent(Event.EventType type, String message, boolean flushBuffer)`
`static void` `triggerIncident(Map<String,Object> incidentInfo)`
`static void` `triggerStateTransition(BasicEvent.QueryState newState, String identifier)`

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

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

### Field Detail

#### DUMP_PATH_PROP

    public static final String DUMP_PATH_PROP

See Also:
  Constant Field Values

#### DUMP_SIZE_PROP

    public static final String DUMP_SIZE_PROP

See Also:
  Constant Field Values

#### DUMP_SUBDIR

    public static final String DUMP_SUBDIR

See Also:
  Constant Field Values

### Constructor Detail

#### EventUtil

    public EventUtil()

### Method Detail

#### initEventHandlerInstance

    public static void initEventHandlerInstance(int maxEntries,
                                                int flushPeriodMs)

Initializes the common eventHandler instance for all sessions/threads

Parameters:
  `maxEntries` - - maximum number of buffered events before flush
  `flushPeriodMs` - - period of time between asynchronous buffer flushes

#### getEventHandlerInstance

    public static EventHandler getEventHandlerInstance()

Returns:
  the shared EventHandler instance

#### triggerBasicEvent

    public static void triggerBasicEvent(Event.EventType type,
                                         String message,
                                         boolean flushBuffer)

#### triggerStateTransition

    public static void triggerStateTransition(BasicEvent.QueryState newState,
                                              String identifier)

#### triggerIncident

    public static void triggerIncident(Map<String,Object> incidentInfo)

#### getDumpPathPrefix

    public static String getDumpPathPrefix()

#### getDumpFileId

    public static String getDumpFileId()

#### getmaxDumpFileSizeBytes

    public static long getmaxDumpFileSizeBytes()