Package com.fayupable.snowflake
Class NoOpSnowflakeMetrics
java.lang.Object
com.fayupable.snowflake.NoOpSnowflakeMetrics
- All Implemented Interfaces:
SnowflakeMetrics
Default
SnowflakeMetrics implementation that discards every event.
Used when no metrics backend is configured, so the generator never has to
null-check its metrics dependency.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled every timenextId()successfully produces an id.voidCalled every time the generator spins waiting for the clock to advance because the current millisecond's sequence capacity is exhausted.
-
Field Details
-
INSTANCE
-
-
Method Details
-
recordIdGenerated
public void recordIdGenerated()Description copied from interface:SnowflakeMetricsCalled every timenextId()successfully produces an id.- Specified by:
recordIdGeneratedin interfaceSnowflakeMetrics
-
recordSpinWait
public void recordSpinWait()Description copied from interface:SnowflakeMetricsCalled every time the generator spins waiting for the clock to advance because the current millisecond's sequence capacity is exhausted.- Specified by:
recordSpinWaitin interfaceSnowflakeMetrics
-