Class AbstractEvent

java.lang.Object
com.couchbase.client.core.cnc.AbstractEvent
All Implemented Interfaces:
Event
Direct Known Subclasses:
BucketClosedEvent, BucketConfigRefreshFailedEvent, BucketConfigUpdatedEvent, BucketOpenedEvent, BucketOpenInitiatedEvent, ChannelClosedProactivelyEvent, CollectionMapDecodingFailedEvent, CollectionMapRefreshFailedEvent, ConfigIgnoredEvent, CoreCreatedEvent, DnsSrvLookupDisabledEvent, DnsSrvLookupFailedEvent, DnsSrvRecordsLoadedEvent, DurabilityTimeoutCoercedEvent, EndpointConnectedEvent, EndpointConnectionAbortedEvent, EndpointConnectionFailedEvent, EndpointConnectionIgnoredEvent, EndpointDisconnectedEvent, EndpointDisconnectionFailedEvent, EndpointStateChangedEvent, EndpointWriteFailedEvent, ErrorMapLoadedEvent, ErrorMapLoadingFailedEvent, ErrorMapUndecodableEvent, FeaturesNegotiatedEvent, FeaturesNegotiationFailedEvent, GenericFailureDetectedEvent, GlobalConfigUpdatedEvent, HighIdleHttpConnectionTimeoutConfiguredEvent, IdleEndpointRemovedEvent, IdleStreamingEndpointClosedEvent, IndividualGlobalConfigLoadFailedEvent, IndividualReplicaGetFailedEvent, InitGlobalConfigFailedEvent, InsecureSecurityConfigDetectedEvent, InvalidPacketDetectedEvent, InvalidRequestDetectedEvent, KeyValueErrorMapCodeHandledEvent, LatencyMetricsAggregatedEvent, NodeConnectedEvent, NodeDisconnectedEvent, NodeDisconnectIgnoredEvent, NodeLocatorBugIdentifiedEvent, NodePartitionLengthNotEqualEvent, NodeStateChangedEvent, OrphanRecordDroppedEvent, OrphanReporterFailureDetectedEvent, OrphansRecordedEvent, OverThresholdRequestsRecordedEvent, PreparedStatementRetriedEvent, ReadTrafficCapturedEvent, ReconfigurationCompletedEvent, ReconfigurationErrorDetectedEvent, ReconfigurationIgnoredEvent, RequestNotRetriedEvent, RequestRetryScheduledEvent, SaslAuthenticationCompletedEvent, SaslAuthenticationFailedEvent, SaslAuthenticationRestartedEvent, SaslMechanismsListedEvent, SaslMechanismsListingFailedEvent, SaslMechanismsSelectedEvent, SecureConnectionFailedEvent, SeedNodesUpdatedEvent, SelectBucketCompletedEvent, SelectBucketFailedEvent, ServiceAddedEvent, ServiceAddIgnoredEvent, ServiceConnectInitiatedEvent, ServiceDisconnectInitiatedEvent, ServiceReconfigurationFailedEvent, ServiceRemovedEvent, ServiceRemoveIgnoredEvent, ServiceStateChangedEvent, ShutdownCompletedEvent, ShutdownInitiatedEvent, SuspiciousExpiryDurationEvent, UnexpectedEndpointConnectionFailedEvent, UnexpectedEndpointDisconnectedEvent, UnknownResponseReceivedEvent, UnknownResponseStatusReceivedEvent, UnknownSaslMechanismDetectedEvent, UnsolicitedFeaturesReturnedEvent, UnsupportedResponseTypeReceivedEvent, WriteTrafficCapturedEvent

public abstract class AbstractEvent
extends Object
implements Event
This Event implementation can be used as a base event to inherit from.
  • Constructor Details

    • AbstractEvent

      protected AbstractEvent​(Event.Severity severity, Event.Category category, Duration duration, Context context)
    • AbstractEvent

      protected AbstractEvent​(Event.Severity severity, String category, Duration duration, Context context)
      Creates a new abstract event.
      Parameters:
      severity - the severity to use.
      category - the category to use.
      duration - the duration for this event.
      context - the context if provided.
  • Method Details

    • severity

      public Event.Severity severity()
      Description copied from interface: Event
      The Severity of this event.
      Specified by:
      severity in interface Event
      Returns:
      the event severity.
    • category

      public String category()
      Description copied from interface: Event
      The Category of this event.
      Specified by:
      category in interface Event
      Returns:
      the event category.
    • duration

      public Duration duration()
      Description copied from interface: Event
      Returns the duration of this event.
      Specified by:
      duration in interface Event
      Returns:
      the duration of the even, 0 if not set.
    • context

      public Context context()
      Description copied from interface: Event
      The context this event is referencing.
      Specified by:
      context in interface Event
      Returns:
      the referencing context.
    • createdAt

      public long createdAt()
      Description copied from interface: Event
      Contains a nano timestamp when the event was created.
      Specified by:
      createdAt in interface Event
      Returns:
      the time this event got created.
    • toString

      public String toString()
      Overrides:
      toString in class Object