Package com.yahoo.search.logging
Class AbstractSpoolingLogger
java.lang.Object
com.yahoo.component.AbstractComponent
com.yahoo.search.logging.AbstractSpoolingLogger
- All Implemented Interfaces:
com.yahoo.component.Component
,com.yahoo.component.Deconstructable
,Logger
,Comparable<com.yahoo.component.Component>
,Runnable
public abstract class AbstractSpoolingLogger
extends com.yahoo.component.AbstractComponent
implements Runnable
Abstract class that deals with storing event entries on disk and making sure all stored
entries are eventually sent
- Author:
- hmusum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.yahoo.search.logging.AbstractThreadedLogger.WorkerThreadExecutor
protected static final Logger
protected final Spooler
Fields inherited from class com.yahoo.component.AbstractComponent
isDeconstructable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Synchronously shuts down and waits for enqueued entries to be sent.protected void
dequeue
(LoggerEntry entry) protected boolean
enqueue
(LoggerEntry entry) void
run()
boolean
send
(LoggerEntry entry) void
shutdown()
Deprecated.abstract boolean
transport
(LoggerEntry entry) Actually transports the entry to its destinationMethods inherited from class com.yahoo.component.AbstractComponent
clone, compareTo, getClassName, getId, getIdString, hasInitializedId, initId, isDeconstructable, setIsDeconstructable, toString
-
Field Details
-
log
-
spooler
-
executor
protected final com.yahoo.search.logging.AbstractThreadedLogger.WorkerThreadExecutor executor
-
-
Constructor Details
-
AbstractSpoolingLogger
public AbstractSpoolingLogger() -
AbstractSpoolingLogger
-
-
Method Details
-
run
public void run() -
send
-
shutdown
Deprecated. -
deconstruct
public void deconstruct()Synchronously shuts down and waits for enqueued entries to be sent.- Specified by:
deconstruct
in interfacecom.yahoo.component.Deconstructable
-
enqueue
-
dequeue
-
transport
Actually transports the entry to its destination
-