Interface ModelGenerationAware<S>

Type Parameters:
S - service type
All Superinterfaces:
Immutable
All Known Subinterfaces:
OSGiBindingDOMCodecServices, OSGiBindingRuntimeContext, OSGiModuleInfoSnapshot
All Known Implementing Classes:
OSGiBindingDOMCodecServicesImpl, OSGiBindingRuntimeContextImpl, OSGiModuleInfoSnapshotImpl

@Beta @NonNullByDefault public interface ModelGenerationAware<S> extends Immutable
Additional interface for exposing linear generation of the backing effective model. Implementations of this interface are expected to be effectively-immutable.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    computeServiceRanking(long generation)
    Calculate service ranking based on generation.
     
    default int
    Get service ranking based on the generation.
    @NonNull S
     
  • Method Details

    • generation

      Uint64 generation()
    • service

      @NonNull S service()
    • getServiceRanking

      default int getServiceRanking()
      Get service ranking based on the generation. Higher generation results in a higher ranking.
      Returns:
      Ranging for use with Constants.SERVICE_RANKING
    • computeServiceRanking

      static int computeServiceRanking(long generation)
      Calculate service ranking based on generation. Higher generation results in a higher ranking.
      Parameters:
      generation - generation number, treated as an unsigned long
      Returns:
      Ranging for use with Constants.SERVICE_RANKING