public void setPriority(Integer priority) {
        if (priority < 0) {
            throw new IllegalArgumentException("Priority has to be a positive number");
        }
        this.priority = priority;
    }
Set the priority of current rule.
<p>
The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will
attempt to replicate objects according to all replication rules. However, if there are two or more rules with the
same destination bucket, then objects will be replicated according to the rule with the highest priority. The
higher the number, the higher the priority.
</p>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a> in the <i>Amazon Simple
Storage Service Developer Guide</i>.
</p>
@param priority int
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/ReplicationRule.java