Class ServerView.BaseSegmentCallback

java.lang.Object
org.apache.druid.client.ServerView.BaseSegmentCallback
All Implemented Interfaces:
ServerView.SegmentCallback
Enclosing interface:
ServerView

public abstract static class ServerView.BaseSegmentCallback extends Object implements ServerView.SegmentCallback
  • Constructor Details

    • BaseSegmentCallback

      public BaseSegmentCallback()
  • Method Details

    • segmentAdded

      public ServerView.CallbackAction segmentAdded(DruidServerMetadata server, DataSegment segment)
      Description copied from interface: ServerView.SegmentCallback
      Called when a segment is added to a server. The return value indicates if this callback has completed its work. Note that even if this callback indicates that it should be unregistered, it is not possible to guarantee that this callback will not get called again. There is a race condition between when this callback runs and other events that can cause the callback to be queued for running. Thus, callbacks shouldn't assume that they will not get called again after they are done. The contract is that the callback will eventually be unregistered, enforcing a happens-before relationship is not part of the contract.
      Specified by:
      segmentAdded in interface ServerView.SegmentCallback
      Parameters:
      server - The server that added a segment
      segment - The segment that was added
      Returns:
      UNREGISTER if the callback has completed its work and should be unregistered. CONTINUE if the callback should remain registered.
    • segmentRemoved

      public ServerView.CallbackAction segmentRemoved(DruidServerMetadata server, DataSegment segment)
      Description copied from interface: ServerView.SegmentCallback
      Called when a segment is removed from a server. The return value indicates if this callback has completed its work. Note that even if this callback indicates that it should be unregistered, it is not possible to guarantee that this callback will not get called again. There is a race condition between when this callback runs and other events that can cause the callback to be queued for running. Thus, callbacks shouldn't assume that they will not get called again after they are done. The contract is that the callback will eventually be unregistered, enforcing a happens-before relationship is not part of the contract.
      Specified by:
      segmentRemoved in interface ServerView.SegmentCallback
      Parameters:
      server - The server that removed a segment
      segment - The segment that was removed
      Returns:
      UNREGISTER if the callback has completed its work and should be unregistered. CONTINUE if the callback should remain registered.
    • segmentSchemasAnnounced

      public ServerView.CallbackAction segmentSchemasAnnounced(SegmentSchemas segmentSchemas)
      Description copied from interface: ServerView.SegmentCallback
      Called when segment schema is announced.
      Specified by:
      segmentSchemasAnnounced in interface ServerView.SegmentCallback
      Parameters:
      segmentSchemas - segment schema
      Returns:
      continue or unregister
    • segmentViewInitialized

      public ServerView.CallbackAction segmentViewInitialized()
      Specified by:
      segmentViewInitialized in interface ServerView.SegmentCallback