Class B2BucketReplicationConfiguration


  • public class B2BucketReplicationConfiguration
    extends java.lang.Object
    Replication configuration for a bucket. Factory methods are available to create configurations for 1) source-only, 2) destination-only, or 3) simultaneously source and destination buckets.
    • Field Detail

      • NONE

        public static final B2BucketReplicationConfiguration NONE
        Static field for convenience to use with updateBucket() to remove bucket replication configuration
    • Method Detail

      • createForSourceAndDestination

        public static B2BucketReplicationConfiguration createForSourceAndDestination​(java.lang.String sourceApplicationKeyId,
                                                                                     java.util.List<B2ReplicationRule> replicationRules,
                                                                                     java.util.Map<java.lang.String,​java.lang.String> sourceToDestinationKeyMapping)
        Returns a ReplicationConfiguration for a bucket that will be a replication source and a replication destination. All arguments must be non-null, and replicationRules and sourceToDestinationKeyMapping must not be empty.
        Throws:
        java.lang.IllegalArgumentException - if any input arguments are null
      • createForSource

        public static B2BucketReplicationConfiguration createForSource​(java.lang.String sourceApplicationKeyId,
                                                                       java.util.List<B2ReplicationRule> replicationRules)
        Returns a B2BucketReplicationConfiguration for a bucket that will only be a replication source. Both arguments must be non-null and replicationRules must not be empty.
        Throws:
        java.lang.IllegalArgumentException - if any input arguments are null or replicationRules is empty
      • createForDestination

        public static B2BucketReplicationConfiguration createForDestination​(java.util.Map<java.lang.String,​java.lang.String> sourceToDestinationKeyMapping)
        Returns a B2BucketReplicationConfiguration for a bucket that will only be a replication destination. sourceToDestinationKeyMapping must not be null or empty.
        Throws:
        java.lang.IllegalArgumentException - if sourceToDestinationKeyMapping is null or empty
      • getSourceApplicationKeyIdOrNull

        public java.lang.String getSourceApplicationKeyIdOrNull()
      • getReplicationRulesOrNull

        public java.util.List<B2ReplicationRule> getReplicationRulesOrNull()
      • getSourceToDestinationKeyMappingOrNull

        public java.util.Map<java.lang.String,​java.lang.String> getSourceToDestinationKeyMappingOrNull()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

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