Class B2BucketReplicationConfiguration
- java.lang.Object
-
- com.backblaze.b2.client.structures.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 Summary
Fields Modifier and Type Field Description static B2BucketReplicationConfiguration
NONE
Static field for convenience to use with updateBucket() to remove bucket replication configuration
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.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.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.boolean
equals(java.lang.Object o)
java.util.List<B2ReplicationRule>
getReplicationRulesOrNull()
java.lang.String
getSourceApplicationKeyIdOrNull()
java.util.Map<java.lang.String,java.lang.String>
getSourceToDestinationKeyMappingOrNull()
int
hashCode()
java.lang.String
toString()
-
-
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-