Class MetricsCollector.NotificationSnapshot
java.lang.Object
com.pyranid.MetricsCollector.NotificationSnapshot
- Enclosing interface:
MetricsCollector
Counter snapshot for notification metrics.
Implementations may read counters independently without cross-counter atomicity. Callers that need invariant-consistent snapshots should drain in-flight work before reading.
Instances are immutable value objects created through of(Long, Long, Long, Long, Long, Long, Long).
Future releases may add counters and accessors while retaining this factory with defined defaults for any
newly added values.
- Since:
- 4.6.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescription@NonNull LongbooleaninthashCode()@NonNull Longstatic @NonNull MetricsCollector.NotificationSnapshotof(@NonNull Long sessionsStarted, @NonNull Long sessionsOpened, @NonNull Long sessionsCallbackReturned, @NonNull Long sessionsInterrupted, @NonNull Long sessionsFailed, @NonNull Long batchesDelivered, @NonNull Long notificationsDelivered) Creates a notification metrics snapshot.@NonNull Long@NonNull Long@NonNull Long@NonNull Long@NonNull Long@NonNull StringtoString()
-
Method Details
-
of
public static @NonNull MetricsCollector.NotificationSnapshot of(@NonNull Long sessionsStarted, @NonNull Long sessionsOpened, @NonNull Long sessionsCallbackReturned, @NonNull Long sessionsInterrupted, @NonNull Long sessionsFailed, @NonNull Long batchesDelivered, @NonNull Long notificationsDelivered) Creates a notification metrics snapshot.- Parameters:
sessionsStarted- valid, type-resolved notification-session invocations that entered measured setupsessionsOpened- notification sessions that completed channel registrationsessionsCallbackReturned- opened notification sessions whose callbacks returned and cleanup completed normallysessionsInterrupted- opened notification sessions that ended through clean cooperative interruptionsessionsFailed- notification-session invocations that failed before opening or after openingbatchesDelivered- nonempty notification batches delivered to application codenotificationsDelivered- notifications contained in delivered batches- Returns:
- notification metrics snapshot
- Throws:
NullPointerException- if any counter is null- Since:
- 4.6.0
-
sessionsStarted
- Returns:
- valid, type-resolved notification-session invocations that entered measured setup
- Since:
- 4.6.0
-
sessionsOpened
- Returns:
- notification sessions that completed channel registration
- Since:
- 4.6.0
-
sessionsCallbackReturned
- Returns:
- opened notification sessions whose callbacks returned and cleanup completed normally
- Since:
- 4.6.0
-
sessionsInterrupted
- Returns:
- opened notification sessions that ended through clean cooperative interruption
- Since:
- 4.6.0
-
sessionsFailed
- Returns:
- notification-session invocations that failed before opening or after opening
- Since:
- 4.6.0
-
batchesDelivered
- Returns:
- nonempty notification batches delivered to application code
- Since:
- 4.6.0
-
notificationsDelivered
- Returns:
- notifications contained in delivered batches
- Since:
- 4.6.0
-
equals
-
hashCode
-
toString
-