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 Details

  • 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 class com.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 public void start(SocketAddress listeningAddress) throws IOException
      Deprecated.
      Throws:
      IOException
    • startInWorker

      public void startInWorker(SocketAddress listeningAddress) throws IOException
      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 address
      statsIntradayLogger - the stats intraday logger
      Throws:
      IOException
    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException