Class AdminTopicMetadataAccessor

    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.Long> generateMetadataMap​(long localOffset, long upstreamOffset, long executionId)  
      static long getExecutionId​(java.util.Map<java.lang.String,​java.lang.Long> metadata)  
      abstract java.util.Map<java.lang.String,​java.lang.Long> getMetadata​(java.lang.String clusterName)
      Retrieve the latest metadata map.
      static Pair<java.lang.Long,​java.lang.Long> getOffsets​(java.util.Map<java.lang.String,​java.lang.Long> metadata)  
      abstract void updateMetadata​(java.lang.String clusterName, java.util.Map<java.lang.String,​java.lang.Long> metadata)
      Update all relevant metadata for a given cluster in a single transaction.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AdminTopicMetadataAccessor

        public AdminTopicMetadataAccessor()
    • Method Detail

      • generateMetadataMap

        public static java.util.Map<java.lang.String,​java.lang.Long> generateMetadataMap​(long localOffset,
                                                                                               long upstreamOffset,
                                                                                               long executionId)
        Returns:
        a map with OFFSET_KEY, UPSTREAM_OFFSET_KEY, EXECUTION_ID_KEY specified to input values.
      • getOffsets

        public static Pair<java.lang.Long,​java.lang.Long> getOffsets​(java.util.Map<java.lang.String,​java.lang.Long> metadata)
        Returns:
        a pair of values to which the specified keys are mapped to OFFSET_KEY and UPSTREAM_OFFSET_KEY.
      • getExecutionId

        public static long getExecutionId​(java.util.Map<java.lang.String,​java.lang.Long> metadata)
        Returns:
        the value to which the specified key is mapped to EXECUTION_ID_KEY.
      • updateMetadata

        public abstract void updateMetadata​(java.lang.String clusterName,
                                            java.util.Map<java.lang.String,​java.lang.Long> metadata)
        Update all relevant metadata for a given cluster in a single transaction.
        Parameters:
        clusterName - of the cluster at interest.
        metadata - map containing relevant information.
      • getMetadata

        public abstract java.util.Map<java.lang.String,​java.lang.Long> getMetadata​(java.lang.String clusterName)
        Retrieve the latest metadata map.
        Parameters:
        clusterName - of the cluster at interest.