Interface ProgressListener

All Known Implementing Classes:
ProgressListener.StreamListener

public interface ProgressListener
Interface for index construction progress listeners.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Progress listener that logs to a print stream all events except for intermediate updates, which are printed to standard out.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ProgressListener
    Default listener that logs all events to standard out.
    static final ProgressListener
    Default listener that ignores all events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when blocks are done being computed for a new index layer.
    void
    Called when blocks are being computed for a new index layer.
    void
    coresBlocksDone(int done, int total)
    Intermediate core computation progress update.
    void
    coresEnd(int k)
    Called when cores for a new layer are done being computed.
    void
    coresStart(int k)
    Called when cores for a new layer start being computed.
    discord(String logFile, String webhookUrl)
    Constructs a new progress listener that logs all events to the given file and to Discord.
    file(String logFile)
    Constructs a new progress listener that logs all event to the given file.
    void
    intermediateProgress(long cores, int blockDone, int totalBlocks)
    Logs and intermediate progress update.
    void
    Called when mapping cores to blocks is done.
    void
    Called when mapping cores to blocks starts.
    void
    partitionCombinationEnd(int k1, int k2)
    Called when partitions are constructed from two previous blocks from a different layer (end).
    void
    partitionCombinationStart(int k1, int k2)
    Called when partitions are constructed from two previous blocks from a different layer (start).
    void
    partitionEnd(int k)
    Called when graph partitioning for a new layer ends.
    void
    Called when graph partitioning for a new layer starts.
    Constructs a new progress listener that logs all event to the given print stream.
  • Field Details

    • LOG

      static final ProgressListener LOG
      Default listener that logs all events to standard out.
    • NONE

      static final ProgressListener NONE
      Default listener that ignores all events.
  • Method Details

    • partitionStart

      void partitionStart(int k)
      Called when graph partitioning for a new layer starts.
      Parameters:
      k - The diameter for the layer being partitioned.
    • partitionCombinationStart

      void partitionCombinationStart(int k1, int k2)
      Called when partitions are constructed from two previous blocks from a different layer (start).
      Parameters:
      k1 - The diameter of the first block.
      k2 - The diameter of the second block.
    • partitionCombinationEnd

      void partitionCombinationEnd(int k1, int k2)
      Called when partitions are constructed from two previous blocks from a different layer (end).
      Parameters:
      k1 - The diameter of the first block.
      k2 - The diameter of the second block.
    • partitionEnd

      void partitionEnd(int k)
      Called when graph partitioning for a new layer ends.
      Parameters:
      k - The diameter for the layer that was partitioned.
    • computeBlocksStart

      void computeBlocksStart(int k)
      Called when blocks are being computed for a new index layer.
      Parameters:
      k - The diameter for the layer that blocks are being computed for.
    • computeBlocksEnd

      void computeBlocksEnd(int k)
      Called when blocks are done being computed for a new index layer.
      Parameters:
      k - The diameter for the layer that blocks were computed for.
    • coresStart

      void coresStart(int k)
      Called when cores for a new layer start being computed.
      Parameters:
      k - The diameter for the layer cores are computed for.
    • coresBlocksDone

      void coresBlocksDone(int done, int total)
      Intermediate core computation progress update.
      Parameters:
      done - Total number of computed blocks.
      total - The number of blocks to compute in total.
    • coresEnd

      void coresEnd(int k)
      Called when cores for a new layer are done being computed.
      Parameters:
      k - The diameter for the layer cores were computed for.
    • mapStart

      void mapStart()
      Called when mapping cores to blocks starts.
    • mapEnd

      void mapEnd()
      Called when mapping cores to blocks is done.
    • intermediateProgress

      void intermediateProgress(long cores, int blockDone, int totalBlocks)
      Logs and intermediate progress update.
      Parameters:
      cores - The total number of cores computed so far.
      blockDone - The total number of blocks done.
      totalBlocks - THe total number of blocks.
    • stream

      static ProgressListener stream(PrintStream out)
      Constructs a new progress listener that logs all event to the given print stream. Intermediate updates are still printed to standard out.
      Parameters:
      out - The print stream to log to.
      Returns:
      The constructed progress listener.
    • file

      static ProgressListener file(String logFile) throws IOException
      Constructs a new progress listener that logs all event to the given file.
      Parameters:
      logFile - The name of the file to log to.
      Returns:
      The constructed progress listener.
      Throws:
      IOException - When an IOException occurs.
    • discord

      static ProgressListener discord(String logFile, String webhookUrl) throws IOException, URISyntaxException
      Constructs a new progress listener that logs all events to the given file and to Discord. Block updates are not logged to Discord and intermediate updates are not logged to the file and also printed to standard out.
      Parameters:
      logFile - The name of the file to log to.
      webhookUrl - The Discord webhook to log to.
      Returns:
      The constructed progress listener.
      Throws:
      IOException - When an IOException occurs.
      URISyntaxException - When the URI is invalid.