Package com.carrotgarden.nexus.aws.s3.publish.mail

Examples of com.carrotgarden.nexus.aws.s3.publish.mail.CarrotMailer


    final ConfigEntry entry = configEntry();

    final String comboId = entry.comboId();

    final AmazonService service = entry.amazonService();

    final List<String> repoList = RepoHelp.repoList(repoRegistry, comboId);

    final Pattern defaultExclude = ConfigHelp.defaultExclude();
View Full Code Here


          if (entry.isExcluded(path)) {
            reporter.amazonIgnoredFileCount.inc();
            continue;
          }

          final AmazonService service = entry.amazonService();

          isSaved &= AmazonHelp.storeItem( //
              service, repository, item, file, log);

          if (isSaved) {
View Full Code Here

    final ConfigEntry entry = reference
        .capabilityAs(ConfigCapability.class);

    final String comboId = entry.comboId();

    final AmazonService amazonService = entry.amazonService();

    final List<String> repoList = RepoHelp.repoList(repoRegistry, comboId);

    for (final String repoId : repoList) {
View Full Code Here

          if (entry.isExcluded(path)) {
            reporter.amazonIgnoredFileCount.inc();
            continue;
          }

          final AmazonService amazonService = entry.amazonService();

          isSaved &= AmazonHelp.storeItem( //
              amazonService, repository, item, file, log);

          if (isSaved) {
View Full Code Here

    final ConfigEntry entry = configEntry();

    final String comboId = entry.comboId();

    final AmazonService amazonService = entry.amazonService();

    final List<String> repoList = RepoHelp.repoList(repoRegistry, comboId);

    for (final String repoId : repoList) {
View Full Code Here

          if (entry.isExcluded(path)) {
            reporter.amazonIgnoredFileCount.inc();
            continue;
          }

          final AmazonService amazonService = entry.amazonService();

          isSaved &= AmazonHelp.storeItem( //
              amazonService, repo, item, file, log);

          if (isSaved) {
View Full Code Here

    final CapabilityIdentity capaId = new CapabilityIdentity(configId());

    final CapabilityReference reference = capaRegistry.get(capaId);

    final ConfigEntry entry = reference
        .capabilityAs(ConfigCapability.class);

    return entry;

  }
View Full Code Here

    if (shouldYield()) {
      log.info("yielding to priority tasks");
      return;
    }

    final ConfigEntry entry = configEntry();

    final String comboId = entry.comboId();

    final AmazonService service = entry.amazonService();

    final List<String> repoList = RepoHelp.repoList(repoRegistry, comboId);

    final Pattern defaultExclude = ConfigHelp.defaultExclude();

    for (final String repoId : repoList) {

      checkInterruption();

      doSleep(scannerRepositorySleepTime());

      final Repository repo = repoRegistry.getRepository(repoId);

      final File root = RepoHelp.repoRoot(repo);

      final CarrotListener listener = new CarrotListenerSupport() {

        @Override
        public void onBegin() {

          log.info("##########################################");
          log.info("repo scan init : {} {}", configId(), repoId);

        }

        @Override
        public void onEnd() {

          log.info("repo stats : processed={} published={}",
              reporter.scanCount.count(),
              reporter.amazonPublishedFileCount.count());
          log.info("repo scan done : {} {}", configId(), repoId);
          log.info("##########################################");
        }

        @Override
        public boolean skipDirectory(final File directory) {

          final String path = //
          rootFullPath(relativePath(root, directory));

          final boolean isExcluded = defaultExclude.matcher(path)
              .matches();

          return isExcluded;

        }

        @Override
        public boolean skipFile(final File file) {

          return false;

        }

        @Override
        public void onFile(final File file) {
          try {

            checkInterruption();

            reporter.scanCount.inc();
            reporter.scanRate.mark();

            reporter.repoFilePeek.add(file);

            final String path = //
            rootFullPath(relativePath(root, file));

            if (entry.isExcluded(path)) {
              reporter.amazonIgnoredFileCount.inc();
              return;
            }

            final ResourceStoreRequest request = //
View Full Code Here

    final CapabilityIdentity capaId = new CapabilityIdentity(configId());

    final CapabilityReference reference = capaRegistry.get(capaId);

    final ConfigEntry entry = reference
        .capabilityAs(ConfigCapability.class);

    final String comboId = entry.comboId();

    final AmazonService amazonService = entry.amazonService();

    final List<String> repoList = RepoHelp.repoList(repoRegistry, comboId);

    for (final String repoId : repoList) {

      checkInterruption();

      doSleep(scannerRepositorySleepTime());

      final Repository repo = repoRegistry.getRepository(repoId);

      final File root = RepoHelp.repoRoot(repo);

      final Listener listener = new ListenerSupport() {

        @Override
        public void onBegin() {

          log.info("##########################################");
          log.info("repo scan init : {} {}", configId(), repoId);

        }

        @Override
        public void onEnd() {

          log.info("repo stats : total={} success={}",
              reporter.amazonPublishedFileSize.count(),
              reporter.amazonPublishedFileCount.count());
          log.info("repo scan done : {} {}", configId(), repoId);
          log.info("##########################################");
        }

        @Override
        public void onFile(final File file) {
          try {

            reporter.repoFilePeek.add(file);

            reporter.fileRate.mark();
            reporter.fileCount.inc();

            checkInterruption();

            final String path = //
            PathHelp.rootFullPath(PathHelp.relativePath(root, file));

            if (entry.isExcluded(path)) {
              reporter.amazonIgnoredFileCount.inc();
              return;
            }

            reporter.repoFileSize.inc(file.length());
View Full Code Here

    final CapabilityIdentity capaId = new CapabilityIdentity(configId());

    final CapabilityReference reference = capaRegistry.get(capaId);

    final ConfigEntry entry = reference
        .capabilityAs(ConfigCapability.class);

    return entry;

  }
View Full Code Here

TOP

Related Classes of com.carrotgarden.nexus.aws.s3.publish.mail.CarrotMailer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.