Class LogAggregatorService
java.lang.Object
com.fishlib.util.process.OnetimeShutdownTask
com.illumon.iris.db.v2.logaggregator.LogAggregatorService
- All Implemented Interfaces:
com.fishlib.util.process.ShutdownManager.Task
public class LogAggregatorService
extends com.fishlib.util.process.OnetimeShutdownTask
Service to allow binary logging over the network.
Any client that can log to a file can log to this service instead, by changing the BinaryStoreWriterFactory in use.
Multiple clients producing data for the same identifying 4-tuple may be combined into a single file.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLogAggregatorService
(com.fishlib.configuration.Configuration configuration, com.fishlib.io.logger.Logger log, LogAggregatorConfig lasConfig) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
protected RollingFileManager
makeChannelManager
(FullTableLocationKey tk, ByteBuffer headerBuffer) Create a RollingFileManager for the output file.protected void
shutdown()
protected void
signalReady
(int actualPort) This will be called when the service has started.void
start
(SocketAddress listeningAddress) Deprecated.void
start
(SocketAddress listeningAddress, com.fishlib.stats.StatsIntradayLogger statsIntradayLogger) Run the LogAggregatorService.void
startInWorker
(SocketAddress listeningAddress) Run the LogAggregatorService in-worker.Methods inherited from class com.fishlib.util.process.OnetimeShutdownTask
adapt, awaitShutdown, awaitShutdown, invoke, isShutdown
-
Field Details
-
AUTH_SERVICE_NAME
- See Also:
-
dateFormat
-
-
Constructor Details
-
LogAggregatorService
public LogAggregatorService(@NotNull com.fishlib.configuration.Configuration configuration, @NotNull com.fishlib.io.logger.Logger log, @NotNull LogAggregatorConfig lasConfig)
-
-
Method Details
-
shutdown
protected void shutdown()- Specified by:
shutdown
in classcom.fishlib.util.process.OnetimeShutdownTask
-
makeChannelManager
protected RollingFileManager makeChannelManager(FullTableLocationKey tk, ByteBuffer headerBuffer) throws IOException Create a RollingFileManager for the output file. This is an extension point for testing.- Parameters:
tk
- FullTableLocationKey identifying this stream.headerBuffer
- the header buffer- Returns:
- a new channel manager
- Throws:
IOException
-
signalReady
protected void signalReady(int actualPort) This will be called when the service has started.- Parameters:
actualPort
- the actual port the service is bound to
-
start
Deprecated.usestartInWorker(SocketAddress)
} instead- Throws:
IOException
-
startInWorker
Run the LogAggregatorService in-worker.- Parameters:
listeningAddress
- listen on this address- Throws:
IOException
-
start
public void start(SocketAddress listeningAddress, com.fishlib.stats.StatsIntradayLogger statsIntradayLogger) throws IOException Run the LogAggregatorService.- Parameters:
listeningAddress
- listen on this addressstatsIntradayLogger
- the stats intraday logger- Throws:
IOException
-
main
- Throws:
IOException
-
startInWorker(SocketAddress)
} instead