/** * Figure out next task to run based on current state, task, and shutdown context. * * @return Return next task to run */ private ITask getNextTask() { ITask nextTask = currentState.createTask(this); if (nextTask == null) { return null; } else { return new MetricsCollectingTaskDecorator(nextTask, metricsFactory); } }
leaseCoordinator.getLeaseManager(), initialPosition, cleanupLeasesUponShardCompletion, config.shouldIgnoreUnexpectedChildShards(), 0L); result = new MetricsCollectingTaskDecorator(shardSyncTask, metricsFactory).call(); } else { LOG.info("Skipping shard sync per config setting (and lease table is not empty)");
new MetricsCollectingTaskDecorator(new ShardSyncTask(kinesisProxy, leaseManager, initialPositionInStream,