Class PubSubTopicConfiguration


  • public class PubSubTopicConfiguration
    extends java.lang.Object
    Represents a PubSubTopic configuration.
    • Constructor Summary

      Constructors 
      Constructor Description
      PubSubTopicConfiguration​(java.util.Optional<java.lang.Long> retentionInMs, boolean isLogCompacted, java.util.Optional<java.lang.Integer> minInSyncReplicas, java.lang.Long minLogCompactionLagMs, java.util.Optional<java.lang.Long> maxLogCompactionLagMs)  
    • Constructor Detail

      • PubSubTopicConfiguration

        public PubSubTopicConfiguration​(java.util.Optional<java.lang.Long> retentionInMs,
                                        boolean isLogCompacted,
                                        java.util.Optional<java.lang.Integer> minInSyncReplicas,
                                        java.lang.Long minLogCompactionLagMs,
                                        java.util.Optional<java.lang.Long> maxLogCompactionLagMs)
    • Method Detail

      • isLogCompacted

        public boolean isLogCompacted()
        Returns:
        whether the topic is log compacted
      • minInSyncReplicas

        public java.util.Optional<java.lang.Integer> minInSyncReplicas()
        Returns:
        min number of replicas that must be in sync before a message is considered committed
      • retentionInMs

        public java.util.Optional<java.lang.Long> retentionInMs()
        Returns:
        retention time for data in this topic
      • minLogCompactionLagMs

        public java.lang.Long minLogCompactionLagMs()
        Returns:
        min log compaction lag in ms
      • setLogCompacted

        public void setLogCompacted​(boolean isLogCompacted)
        Parameters:
        isLogCompacted - whether the topic is log compacted
      • setRetentionInMs

        public void setRetentionInMs​(java.util.Optional<java.lang.Long> retentionInMs)
        Parameters:
        retentionInMs - retention time for data in this topic
      • setMinInSyncReplicas

        public void setMinInSyncReplicas​(java.util.Optional<java.lang.Integer> minInSyncReplicas)
        Parameters:
        minInSyncReplicas - min number of replicas that must be in sync before a message is considered committed
      • setMinLogCompactionLagMs

        public void setMinLogCompactionLagMs​(java.lang.Long minLogCompactionLagMs)
        Parameters:
        minLogCompactionLagMs - min log compaction lag in ms
      • getMaxLogCompactionLagMs

        public java.util.Optional<java.lang.Long> getMaxLogCompactionLagMs()
      • setMaxLogCompactionLagMs

        public void setMaxLogCompactionLagMs​(java.util.Optional<java.lang.Long> maxLogCompactionLagMs)
        The maximum time a message will remain ineligible for compaction in the log. Only applicable for logs that are being compacted.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object