Interface MetadataSupervisorManager

All Known Implementing Classes:
SQLMetadataSupervisorManager

public interface MetadataSupervisorManager
  • Method Details

    • start

      void start()
    • insert

      void insert(String id, SupervisorSpec spec)
    • getAll

    • getAllForId

      List<VersionedSupervisorSpec> getAllForId(String id, @Nullable Integer limit)
      Get supervisor history for a given supervisor ID with an optional limit
      Parameters:
      id - the supervisor ID
      limit - maximum number of history entries to return (null for all entries)
      Returns:
      list of versioned supervisor specs for the given ID
    • getLatest

      Map<String,SupervisorSpec> getLatest()
      Return latest supervisors (both active and terminated)
      Returns:
      latest terminated supervisors
    • getLatestActiveOnly

      Map<String,SupervisorSpec> getLatestActiveOnly()
      Only return the latest active supervisors
      Returns:
      latest active supervisors
    • getLatestTerminatedOnly

      Map<String,SupervisorSpec> getLatestTerminatedOnly()
      Only return the latest terminated supervisors
      Returns:
      latest terminated supervisors
    • removeTerminatedSupervisorsOlderThan

      int removeTerminatedSupervisorsOlderThan(long timestamp)
      Remove terminated supervisors created before the given timestamp.
      Parameters:
      timestamp - timestamp in milliseconds
      Returns:
      number of supervisor removed