com.amazonaws.services.s3.model.lifecycle.LifecycleFilter源码实例Demo

类com.amazonaws.services.s3.model.lifecycle.LifecycleFilter源码实例Demo

下面列出了com.amazonaws.services.s3.model.lifecycle.LifecycleFilter 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: nexus-blobstore-s3   文件: S3BlobStore.java
BucketLifecycleConfiguration makeLifecycleConfiguration(BucketLifecycleConfiguration existing, int expirationInDays) {
  BucketLifecycleConfiguration.Rule rule = new BucketLifecycleConfiguration.Rule()
      .withId(LIFECYCLE_EXPIRATION_RULE_ID)
      .withFilter(new LifecycleFilter(
          new LifecycleTagPredicate(DELETED_TAG)))
      .withExpirationInDays(expirationInDays)
      .withStatus(BucketLifecycleConfiguration.ENABLED.toString());

  if (existing != null) {
    existing.getRules().add(rule);
    return existing;
  } else {
    return new BucketLifecycleConfiguration().withRules(rule);
  }
}
 
源代码2 项目: entrada   文件: AmazonInitializer.java
private BucketLifecycleConfiguration.Rule createExpirationRule(String id, String prefix,
    int expiration) {
  return new BucketLifecycleConfiguration.Rule()
      .withId(id)
      .withFilter(new LifecycleFilter(new LifecyclePrefixPredicate(prefix)))
      .withExpirationInDays(expiration)
      .withStatus(BucketLifecycleConfiguration.ENABLED);
}
 
源代码3 项目: flink   文件: XmlResponsesSaxParser.java
@Override
protected void doStartElement(
    String uri,
    String name,
    String qName,
    Attributes attrs) {

    if (in("LifecycleConfiguration")) {
        if (name.equals("Rule")) {
            currentRule = new Rule();
        }
    } else if (in("LifecycleConfiguration", "Rule")) {
        if (name.equals("Transition")) {
            currentTransition = new Transition();
        } else if (name.equals("NoncurrentVersionTransition")) {
            currentNcvTransition = new NoncurrentVersionTransition();
        } else if (name.equals("AbortIncompleteMultipartUpload")) {
            abortIncompleteMultipartUpload = new
                AbortIncompleteMultipartUpload();
        } else if (name.equals("Filter")) {
            currentFilter = new LifecycleFilter();
        }
    } else if (in("LifecycleConfiguration", "Rule", "Filter")) {
        if (name.equals("And")) {
            andOperandsList = new ArrayList<LifecycleFilterPredicate>();
        }
    }
}
 
如果文章对您有帮助,请点击页面广告。以鼓励作者做出的努力。
 类方法
 同包方法