Package 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 Modifier and Type Field Description static String
DUMP_PATH_PROP
static String
DUMP_SIZE_PROP
static String
DUMP_SUBDIR
-
Constructor Summary
Constructors Constructor Description EventUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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/threadsstatic void
setDumpPathPrefixForTesting(String value)
Junit is not recognizing the system properties for EventTest, so overriding the value herestatic void
triggerBasicEvent(Event.EventType type, String message, boolean flushBuffer)
static void
triggerStateTransition(BasicEvent.QueryState newState, String identifier)
-
-
-
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
-
-
Method Detail
-
setDumpPathPrefixForTesting
public static void setDumpPathPrefixForTesting(String value)
Junit is not recognizing the system properties for EventTest, so overriding the value here- Parameters:
value
- string value
-
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 flushflushPeriodMs
- - 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)
-
getDumpPathPrefix
public static String getDumpPathPrefix()
-
getDumpFileId
public static String getDumpFileId()
-
getmaxDumpFileSizeBytes
public static long getmaxDumpFileSizeBytes()
-
-