Addressed Comments

This commit is contained in:
Wei 2017-10-06 14:39:18 -07:00
parent be34a50f59
commit eff10a8253
3 changed files with 3 additions and 2 deletions

View file

@ -16,7 +16,6 @@
package com.amazonaws.services.kinesis.clientlibrary.lib.worker; package com.amazonaws.services.kinesis.clientlibrary.lib.worker;
import com.amazonaws.services.kinesis.clientlibrary.types.ProcessRecordsInput; import com.amazonaws.services.kinesis.clientlibrary.types.ProcessRecordsInput;
import com.amazonaws.services.kinesis.metrics.interfaces.IMetricsScope;
/** /**
* This class is used as a cache for Prefetching data from Kinesis. * This class is used as a cache for Prefetching data from Kinesis.

View file

@ -29,6 +29,7 @@ import com.amazonaws.services.kinesis.model.GetRecordsResult;
import lombok.NonNull; import lombok.NonNull;
import lombok.extern.apachecommons.CommonsLog; import lombok.extern.apachecommons.CommonsLog;
import org.apache.commons.lang.Validate;
/** /**
* This is the prefetch caching class, this class spins up a thread if prefetching is enabled. That thread fetches the * This is the prefetch caching class, this class spins up a thread if prefetching is enabled. That thread fetches the
@ -91,6 +92,7 @@ public class PrefetchGetRecordsCache implements GetRecordsCache {
this.metricsFactory = new ThreadSafeMetricsDelegatingFactory(metricsFactory); this.metricsFactory = new ThreadSafeMetricsDelegatingFactory(metricsFactory);
this.idleMillisBetweenCalls = idleMillisBetweenCalls; this.idleMillisBetweenCalls = idleMillisBetweenCalls;
this.defaultGetRecordsCacheDaemon = new DefaultGetRecordsCacheDaemon(); this.defaultGetRecordsCacheDaemon = new DefaultGetRecordsCacheDaemon();
Validate.notEmpty(operation, "Operation cannot be empty");
this.operation = operation; this.operation = operation;
} }

View file

@ -26,7 +26,7 @@ public interface RecordsFetcherFactory {
* @param getRecordsRetrievalStrategy GetRecordsRetrievalStrategy to be used with the GetRecordsCache * @param getRecordsRetrievalStrategy GetRecordsRetrievalStrategy to be used with the GetRecordsCache
* @param shardId ShardId of the shard that the fetcher will retrieve records for * @param shardId ShardId of the shard that the fetcher will retrieve records for
* @param metricsFactory MetricsFactory used to create metricScope * @param metricsFactory MetricsFactory used to create metricScope
* @param operation operation used to set metricScope * @param operation operation name used to emit metrics
* *
* @return GetRecordsCache used to get records from Kinesis. * @return GetRecordsCache used to get records from Kinesis.
*/ */