Class BaseSource
java.lang.Object
com.arpnetworking.metrics.common.sources.BaseSource
- All Implemented Interfaces:
com.arpnetworking.commons.observer.Observable
,Source
- Direct Known Subclasses:
ActorSource
,FileSource
,KafkaSource
,MappingSource
,TimeStampingSource
Abstract base class for common functionality for obtaining
Record
. This
class is thread safe.- Author:
- Ville Koskela (ville dot koskela at inscopemetrics dot io)
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
BaseSource.Builder<B extends BaseSource.Builder<B,
S>, S extends Source> BaseBuilder
implementation forSource
subclasses. -
Constructor Summary
ModifierConstructorDescriptionprotected
BaseSource
(BaseSource.Builder<?, ?> builder) Protected constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
attach
(com.arpnetworking.commons.observer.Observer observer) void
detach
(com.arpnetworking.commons.observer.Observer observer) getName()
protected void
Dispatch an event to all attachedObserver
instances.Generate a Steno log compatible representation.toString()
-
Constructor Details
-
BaseSource
Protected constructor.- Parameters:
builder
- Instance ofBaseSource.Builder
.
-
-
Method Details
-
attach
public void attach(com.arpnetworking.commons.observer.Observer observer) - Specified by:
attach
in interfacecom.arpnetworking.commons.observer.Observable
-
detach
public void detach(com.arpnetworking.commons.observer.Observer observer) - Specified by:
detach
in interfacecom.arpnetworking.commons.observer.Observable
-
notify
Dispatch an event to all attachedObserver
instances.- Parameters:
event
- The event to dispatch.
-
getName
-
getMetricSafeName
-
toLogValue
Generate a Steno log compatible representation.- Returns:
- Steno log compatible representation.
-
toString
-