Tabnine Logo
com.emc.ecs.sync.config.storage
Code IndexAdd Tabnine to your IDE (free)

How to use com.emc.ecs.sync.config.storage

Best Java code snippets using com.emc.ecs.sync.config.storage (Showing top 20 results out of 315)

origin: EMCECS/ecs-sync

  public CasConfig withConnectionString(String connectionString) {
    setConnectionString(connectionString);
    return this;
  }
}
origin: EMCECS/ecs-sync

public TestConfig withDiscardData(boolean discardData) {
  setDiscardData(discardData);
  return this;
}
origin: EMCECS/ecs-sync

protected LinkOption[] getLinkOptions() {
  return config.isFollowLinks() ? new LinkOption[0] : new LinkOption[]{LinkOption.NOFOLLOW_LINKS};
}
origin: EMCECS/ecs-sync

@Test
public void testArchive() {
  final File archive = new File("/tmp/ecs-sync-archive-test.zip");
  if (archive.exists()) archive.delete();
  archive.deleteOnExit();
  ArchiveConfig archiveConfig = new ArchiveConfig();
  archiveConfig.setPath(archive.getPath());
  archiveConfig.setStoreMetadata(true);
  TestConfig testConfig = new TestConfig().withReadData(true).withDiscardData(false);
  testConfig.withObjectCount(LG_OBJ_COUNT).withMaxSize(LG_OBJ_MAX_SIZE);
  endToEndTest(archiveConfig, testConfig, null, false);
}
origin: EMCECS/ecs-sync

  /**
   * @param nfs
   * @return
   */
  private NfsConfig getNfsConfig(Nfs nfs) {
    NfsConfig nfsConfig = new NfsConfig();
    nfsConfig.setServer(nfs.getServer());
    nfsConfig.setMountPath(nfs.getExportedPath() + testDirectoryPath);
    return nfsConfig;
  }
}
origin: EMCECS/ecs-sync

  @Override
  public Void call() {
    s3.deleteObject(config.getBucketName(), identifier);
    return null;
  }
}, OPERATION_DELETE_OBJECT);
origin: EMCECS/ecs-sync

@Override
public String getIdentifier(String relativePath, boolean directory) {
  if (relativePath == null || relativePath.length() == 0) return config.getKeyPrefix();
  String identifier = config.getKeyPrefix() + relativePath;
  // append trailing slash for directories
  if (directory) identifier += "/";
  return identifier;
}
origin: EMCECS/ecs-sync

@Override
public String getIdentifier(String relativePath, boolean directory) {
  if (relativePath == null || relativePath.length() == 0) return config.getKeyPrefix();
  String identifier = config.getKeyPrefix() + relativePath;
  // append trailing slash for directories
  if (directory) identifier += "/";
  return identifier;
}
origin: EMCECS/ecs-sync

  @Override
  public Void call() {
    s3.deleteObject(config.getBucketName(), identifier);
    return null;
  }
}, OPERATION_DELETE_OBJECT);
origin: EMCECS/ecs-sync

@Override
public Iterable<ObjectSummary> allObjects() {
  if (config.isIncludeVersions()) {
    return new Iterable<ObjectSummary>() {
      @Override
      public Iterator<ObjectSummary> iterator() {
        return new CombinedIterator<>(Arrays.asList(new PrefixIterator(config.getKeyPrefix()), new DeletedObjectIterator(config.getKeyPrefix())));
      }
    };
  } else {
    return new Iterable<ObjectSummary>() {
      @Override
      public Iterator<ObjectSummary> iterator() {
        return new PrefixIterator(config.getKeyPrefix());
      }
    };
  }
}
origin: EMCECS/ecs-sync

@Override
public Iterable<ObjectSummary> allObjects() {
  if (config.isIncludeVersions()) {
    return new Iterable<ObjectSummary>() {
      @Override
      public Iterator<ObjectSummary> iterator() {
        return new CombinedIterator<>(Arrays.asList(new PrefixIterator(config.getKeyPrefix()), new DeletedObjectIterator(config.getKeyPrefix())));
      }
    };
  } else {
    return new Iterable<ObjectSummary>() {
      @Override
      public Iterator<ObjectSummary> iterator() {
        return new PrefixIterator(config.getKeyPrefix());
      }
    };
  }
}
origin: EMCECS/ecs-sync

private String casWriteClip(CasClip clip) throws FPLibraryException {
  String clipId;
  if (config.isSynchronizeClipWrite())
    synchronized (pool) {
      clipId = clip.Write();
    }
  else
    clipId = clip.Write();
  return clipId;
}
origin: EMCECS/ecs-sync

  @Override
  public AccessControlList call() {
    if (versionId == null) return s3.getObjectAcl(config.getBucketName(), key);
    else return s3.getObjectAcl(config.getBucketName(), key, versionId);
  }
}, OPERATION_GET_ACL);
origin: EMCECS/ecs-sync

@Override
public String getRelativePath(String identifier, boolean directory) {
  String relativePath = identifier;
  if (relativePath.startsWith(config.getKeyPrefix()))
    relativePath = relativePath.substring(config.getKeyPrefix().length());
  // remove trailing slash from directories
  if (directory && relativePath.endsWith("/"))
    relativePath = relativePath.substring(0, relativePath.length() - 1);
  return relativePath;
}
origin: EMCECS/ecs-sync

@Override
public String getRelativePath(String identifier, boolean directory) {
  String relativePath = identifier;
  if (relativePath.startsWith(config.getKeyPrefix()))
    relativePath = relativePath.substring(config.getKeyPrefix().length());
  // remove trailing slash from directories
  if (directory && relativePath.endsWith("/"))
    relativePath = relativePath.substring(0, relativePath.length() - 1);
  return relativePath;
}
origin: EMCECS/ecs-sync

  @Override
  public Void call() {
    s3.deleteObject(config.getBucketName(), identifier);
    return null;
  }
}, OPERATION_DELETE_OBJECT);
origin: EMCECS/ecs-sync

  @Override
  public Void call() {
    s3.deleteObject(config.getBucketName(), identifier);
    return null;
  }
}, OPERATION_DELETE_OBJECT);
origin: EMCECS/ecs-sync

  @Override
  public Iterator<ObjectSummary> iterator() {
    return new PrefixIterator(config.getKeyPrefix());
  }
};
origin: EMCECS/ecs-sync

  @Override
  public Iterator<ObjectSummary> iterator() {
    return new PrefixIterator(config.getKeyPrefix());
  }
};
origin: EMCECS/ecs-sync

  @Override
  public VersionListing call() {
    if (fListing == null) {
      return s3.listVersions(config.getBucketName(), key, null, null, "/", null);
    } else {
      return s3.listNextBatchOfVersions(fListing);
    }
  }
}, OPERATION_LIST_VERSIONS);
com.emc.ecs.sync.config.storage

Most used classes

  • ArchiveConfig
  • AtmosConfig
  • AwsS3Config
  • CasConfig
  • EcsS3Config
  • NfsConfig,
  • TestConfig,
  • AtmosConfig$Hash,
  • AtmosConfig$AccessType
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now