Merge branch 'master' into fix/22077-ingest-attachment

# Conflicts:
#	plugins/ingest-attachment/src/test/resources/org/elasticsearch/ingest/attachment/test/tika-files.zip
This commit is contained in:
David Pilato 2017-02-03 16:15:44 +01:00
commit 626faeafe7
563 changed files with 759 additions and 620 deletions

View File

@ -139,6 +139,7 @@ class PrecommitTasks {
configProperties = [ configProperties = [
suppressions: checkstyleSuppressions suppressions: checkstyleSuppressions
] ]
toolVersion = 7.5
} }
for (String taskName : ['checkstyleMain', 'checkstyleTest']) { for (String taskName : ['checkstyleMain', 'checkstyleTest']) {
Task task = project.tasks.findByName(taskName) Task task = project.tasks.findByName(taskName)

View File

@ -95,7 +95,7 @@ public class BulkBenchmarkTask implements BenchmarkTask {
private final BlockingQueue<List<String>> bulkQueue; private final BlockingQueue<List<String>> bulkQueue;
private final int bulkSize; private final int bulkSize;
public LoadGenerator(Path bulkDataFile, BlockingQueue<List<String>> bulkQueue, int bulkSize) { LoadGenerator(Path bulkDataFile, BlockingQueue<List<String>> bulkQueue, int bulkSize) {
this.bulkDataFile = bulkDataFile; this.bulkDataFile = bulkDataFile;
this.bulkQueue = bulkQueue; this.bulkQueue = bulkQueue;
this.bulkSize = bulkSize; this.bulkSize = bulkSize;
@ -143,7 +143,7 @@ public class BulkBenchmarkTask implements BenchmarkTask {
private final BulkRequestExecutor bulkRequestExecutor; private final BulkRequestExecutor bulkRequestExecutor;
private final SampleRecorder sampleRecorder; private final SampleRecorder sampleRecorder;
public BulkIndexer(BlockingQueue<List<String>> bulkData, int warmupIterations, int measurementIterations, BulkIndexer(BlockingQueue<List<String>> bulkData, int warmupIterations, int measurementIterations,
SampleRecorder sampleRecorder, BulkRequestExecutor bulkRequestExecutor) { SampleRecorder sampleRecorder, BulkRequestExecutor bulkRequestExecutor) {
this.bulkData = bulkData; this.bulkData = bulkData;
this.warmupIterations = warmupIterations; this.warmupIterations = warmupIterations;

View File

@ -73,7 +73,7 @@ public final class RestClientBenchmark extends AbstractBenchmark<RestClient> {
private final RestClient client; private final RestClient client;
private final String actionMetaData; private final String actionMetaData;
public RestBulkRequestExecutor(RestClient client, String index, String type) { RestBulkRequestExecutor(RestClient client, String index, String type) {
this.client = client; this.client = client;
this.actionMetaData = String.format(Locale.ROOT, "{ \"index\" : { \"_index\" : \"%s\", \"_type\" : \"%s\" } }%n", index, type); this.actionMetaData = String.format(Locale.ROOT, "{ \"index\" : { \"_index\" : \"%s\", \"_type\" : \"%s\" } }%n", index, type);
} }

View File

@ -71,7 +71,7 @@ public final class TransportClientBenchmark extends AbstractBenchmark<TransportC
private final String indexName; private final String indexName;
private final String typeName; private final String typeName;
public TransportBulkRequestExecutor(TransportClient client, String indexName, String typeName) { TransportBulkRequestExecutor(TransportClient client, String indexName, String typeName) {
this.client = client; this.client = client;
this.indexName = indexName; this.indexName = indexName;
this.typeName = typeName; this.typeName = typeName;

View File

@ -90,7 +90,7 @@ public class RestNoopBulkAction extends BaseRestHandler {
private final RestRequest request; private final RestRequest request;
public BulkRestBuilderListener(RestChannel channel, RestRequest request) { BulkRestBuilderListener(RestChannel channel, RestRequest request) {
super(channel); super(channel);
this.request = request; this.request = request;
} }

View File

@ -53,7 +53,7 @@ interface HttpAsyncResponseConsumerFactory {
private final int bufferLimit; private final int bufferLimit;
public HeapBufferedResponseConsumerFactory(int bufferLimitBytes) { HeapBufferedResponseConsumerFactory(int bufferLimitBytes) {
this.bufferLimit = bufferLimitBytes; this.bufferLimit = bufferLimitBytes;
} }

View File

@ -705,7 +705,7 @@ public class RestClient implements Closeable {
public final T hosts; public final T hosts;
public final AuthCache authCache; public final AuthCache authCache;
public HostTuple(final T hosts, final AuthCache authCache) { HostTuple(final T hosts, final AuthCache authCache) {
this.hosts = hosts; this.hosts = hosts;
this.authCache = authCache; this.authCache = authCache;
} }

View File

@ -219,7 +219,7 @@ public class RestClientSingleHostIntegTests extends RestClientTestCase {
public void testPreemptiveAuthEnabled() throws IOException { public void testPreemptiveAuthEnabled() throws IOException {
final String[] methods = { "POST", "PUT", "GET", "DELETE" }; final String[] methods = { "POST", "PUT", "GET", "DELETE" };
try (final RestClient restClient = createRestClient(true, true)) { try (RestClient restClient = createRestClient(true, true)) {
for (final String method : methods) { for (final String method : methods) {
final Response response = bodyTest(restClient, method); final Response response = bodyTest(restClient, method);
@ -234,7 +234,7 @@ public class RestClientSingleHostIntegTests extends RestClientTestCase {
public void testPreemptiveAuthDisabled() throws IOException { public void testPreemptiveAuthDisabled() throws IOException {
final String[] methods = { "POST", "PUT", "GET", "DELETE" }; final String[] methods = { "POST", "PUT", "GET", "DELETE" };
try (final RestClient restClient = createRestClient(true, false)) { try (RestClient restClient = createRestClient(true, false)) {
for (final String method : methods) { for (final String method : methods) {
final Response response = bodyTest(restClient, method); final Response response = bodyTest(restClient, method);

View File

@ -56,7 +56,7 @@ public class CollapseTopFieldDocs extends TopFieldDocs {
// Which hit within the shard: // Which hit within the shard:
int hitIndex; int hitIndex;
public ShardRef(int shardIndex) { ShardRef(int shardIndex) {
this.shardIndex = shardIndex; this.shardIndex = shardIndex;
} }
@ -72,7 +72,7 @@ public class CollapseTopFieldDocs extends TopFieldDocs {
final FieldComparator<?>[] comparators; final FieldComparator<?>[] comparators;
final int[] reverseMul; final int[] reverseMul;
public MergeSortQueue(Sort sort, CollapseTopFieldDocs[] shardHits) throws IOException { MergeSortQueue(Sort sort, CollapseTopFieldDocs[] shardHits) throws IOException {
super(shardHits.length); super(shardHits.length);
this.shardHits = new ScoreDoc[shardHits.length][]; this.shardHits = new ScoreDoc[shardHits.length][];
for (int shardIDX = 0; shardIDX < shardHits.length; shardIDX++) { for (int shardIDX = 0; shardIDX < shardHits.length; shardIDX++) {

View File

@ -56,7 +56,7 @@ abstract class CollapsingDocValuesSource<T> {
private NumericDocValues values; private NumericDocValues values;
private Bits docsWithField; private Bits docsWithField;
public Numeric(String field) throws IOException { Numeric(String field) throws IOException {
super(field); super(field);
} }
@ -122,7 +122,7 @@ abstract class CollapsingDocValuesSource<T> {
private Bits docsWithField; private Bits docsWithField;
private SortedDocValues values; private SortedDocValues values;
public Keyword(String field) throws IOException { Keyword(String field) throws IOException {
super(field); super(field);
} }

View File

@ -392,7 +392,7 @@ public long ramBytesUsed() {
final BytesRefBuilder spare = new BytesRefBuilder(); final BytesRefBuilder spare = new BytesRefBuilder();
private char sepLabel; private char sepLabel;
public EscapingTokenStreamToAutomaton(char sepLabel) { EscapingTokenStreamToAutomaton(char sepLabel) {
this.sepLabel = sepLabel; this.sepLabel = sepLabel;
} }
@ -432,7 +432,7 @@ public long ramBytesUsed() {
private final boolean hasPayloads; private final boolean hasPayloads;
public AnalyzingComparator(boolean hasPayloads) { AnalyzingComparator(boolean hasPayloads) {
this.hasPayloads = hasPayloads; this.hasPayloads = hasPayloads;
} }
@ -1114,7 +1114,7 @@ public long ramBytesUsed() {
BytesRef payload; BytesRef payload;
long weight; long weight;
public SurfaceFormAndPayload(BytesRef payload, long cost) { SurfaceFormAndPayload(BytesRef payload, long cost) {
super(); super();
this.payload = payload; this.payload = payload;
this.weight = cost; this.weight = cost;

View File

@ -214,7 +214,7 @@ public final class ExceptionsHelper {
final String index; final String index;
final Class<? extends Throwable> causeType; final Class<? extends Throwable> causeType;
public GroupBy(Throwable t) { GroupBy(Throwable t) {
if (t instanceof ElasticsearchException) { if (t instanceof ElasticsearchException) {
final Index index = ((ElasticsearchException) t).getIndex(); final Index index = ((ElasticsearchException) t).getIndex();
if (index != null) { if (index != null) {

View File

@ -382,7 +382,7 @@ public class ActionModule extends AbstractModule {
static Map<String, ActionHandler<?, ?>> setupActions(List<ActionPlugin> actionPlugins) { static Map<String, ActionHandler<?, ?>> setupActions(List<ActionPlugin> actionPlugins) {
// Subclass NamedRegistry for easy registration // Subclass NamedRegistry for easy registration
class ActionRegistry extends NamedRegistry<ActionHandler<?, ?>> { class ActionRegistry extends NamedRegistry<ActionHandler<?, ?>> {
public ActionRegistry() { ActionRegistry() {
super("action"); super("action");
} }

View File

@ -29,5 +29,5 @@ public interface ListenableActionFuture<T> extends ActionFuture<T> {
/** /**
* Add an action listener to be invoked when a response has received. * Add an action listener to be invoked when a response has received.
*/ */
void addListener(final ActionListener<T> listener); void addListener(ActionListener<T> listener);
} }

View File

@ -217,7 +217,7 @@ public class TransportCancelTasksAction extends TransportTasksAction<Cancellable
private final AtomicInteger counter; private final AtomicInteger counter;
private final int nodesSize; private final int nodesSize;
public BanLock(int nodesSize, Runnable finish) { BanLock(int nodesSize, Runnable finish) {
counter = new AtomicInteger(0); counter = new AtomicInteger(0);
this.finish = finish; this.finish = finish;
this.nodesSize = nodesSize; this.nodesSize = nodesSize;
@ -268,7 +268,7 @@ public class TransportCancelTasksAction extends TransportTasksAction<Cancellable
this.ban = false; this.ban = false;
} }
public BanParentTaskRequest() { BanParentTaskRequest() {
} }
@Override @Override

View File

@ -47,7 +47,7 @@ public enum SnapshotIndexShardStage {
private boolean completed; private boolean completed;
private SnapshotIndexShardStage(byte value, boolean completed) { SnapshotIndexShardStage(byte value, boolean completed) {
this.value = value; this.value = value;
this.completed = completed; this.completed = completed;
} }

View File

@ -34,7 +34,7 @@ import java.util.List;
*/ */
public class GetIndexRequest extends ClusterInfoRequest<GetIndexRequest> { public class GetIndexRequest extends ClusterInfoRequest<GetIndexRequest> {
public static enum Feature { public enum Feature {
ALIASES((byte) 0, "_aliases", "_alias"), ALIASES((byte) 0, "_aliases", "_alias"),
MAPPINGS((byte) 1, "_mappings", "_mapping"), MAPPINGS((byte) 1, "_mappings", "_mapping"),
SETTINGS((byte) 2, "_settings"); SETTINGS((byte) 2, "_settings");
@ -52,7 +52,7 @@ public class GetIndexRequest extends ClusterInfoRequest<GetIndexRequest> {
private final String preferredName; private final String preferredName;
private final byte id; private final byte id;
private Feature(byte id, String... validNames) { Feature(byte id, String... validNames) {
assert validNames != null && validNames.length > 0; assert validNames != null && validNames.length > 0;
this.id = id; this.id = id;
this.validNames = Arrays.asList(validNames); this.validNames = Arrays.asList(validNames);

View File

@ -47,7 +47,7 @@ public abstract class Condition<T> implements NamedWriteable {
this.name = name; this.name = name;
} }
public abstract Result evaluate(final Stats stats); public abstract Result evaluate(Stats stats);
@Override @Override
public final String toString() { public final String toString() {

View File

@ -226,7 +226,7 @@ public class TransportIndicesShardStoresAction extends TransportMasterNodeReadAc
private final List<NodeGatewayStartedShards> responses; private final List<NodeGatewayStartedShards> responses;
private final List<FailedNodeException> failures; private final List<FailedNodeException> failures;
public Response(ShardId shardId, List<NodeGatewayStartedShards> responses, List<FailedNodeException> failures) { Response(ShardId shardId, List<NodeGatewayStartedShards> responses, List<FailedNodeException> failures) {
this.shardId = shardId; this.shardId = shardId;
this.responses = responses; this.responses = responses;
this.failures = failures; this.failures = failures;

View File

@ -171,7 +171,7 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
private final int numberOfElements; private final int numberOfElements;
public ConstantBackoff(TimeValue delay, int numberOfElements) { ConstantBackoff(TimeValue delay, int numberOfElements) {
assert numberOfElements >= 0; assert numberOfElements >= 0;
this.delay = delay; this.delay = delay;
this.numberOfElements = numberOfElements; this.numberOfElements = numberOfElements;
@ -188,7 +188,7 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
private final int numberOfElements; private final int numberOfElements;
private int curr; private int curr;
public ConstantBackoffIterator(TimeValue delay, int numberOfElements) { ConstantBackoffIterator(TimeValue delay, int numberOfElements) {
this.delay = delay; this.delay = delay;
this.numberOfElements = numberOfElements; this.numberOfElements = numberOfElements;
} }
@ -212,7 +212,7 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
private final BackoffPolicy delegate; private final BackoffPolicy delegate;
private final Runnable onBackoff; private final Runnable onBackoff;
public WrappedBackoffPolicy(BackoffPolicy delegate, Runnable onBackoff) { WrappedBackoffPolicy(BackoffPolicy delegate, Runnable onBackoff) {
this.delegate = delegate; this.delegate = delegate;
this.onBackoff = onBackoff; this.onBackoff = onBackoff;
} }
@ -227,7 +227,7 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
private final Iterator<TimeValue> delegate; private final Iterator<TimeValue> delegate;
private final Runnable onBackoff; private final Runnable onBackoff;
public WrappedBackoffIterator(Iterator<TimeValue> delegate, Runnable onBackoff) { WrappedBackoffIterator(Iterator<TimeValue> delegate, Runnable onBackoff) {
this.delegate = delegate; this.delegate = delegate;
this.onBackoff = onBackoff; this.onBackoff = onBackoff;
} }

View File

@ -59,7 +59,7 @@ abstract class BulkRequestHandler {
private final BulkProcessor.Listener listener; private final BulkProcessor.Listener listener;
private final BackoffPolicy backoffPolicy; private final BackoffPolicy backoffPolicy;
public SyncBulkRequestHandler(Client client, BackoffPolicy backoffPolicy, BulkProcessor.Listener listener) { SyncBulkRequestHandler(Client client, BackoffPolicy backoffPolicy, BulkProcessor.Listener listener) {
super(client); super(client);
this.backoffPolicy = backoffPolicy; this.backoffPolicy = backoffPolicy;
this.listener = listener; this.listener = listener;

View File

@ -102,7 +102,7 @@ public class Retry {
private volatile BulkRequest currentBulkRequest; private volatile BulkRequest currentBulkRequest;
private volatile ScheduledFuture<?> scheduledRequestFuture; private volatile ScheduledFuture<?> scheduledRequestFuture;
public AbstractRetryHandler(Class<? extends Throwable> retryOnThrowable, BackoffPolicy backoffPolicy, Client client, ActionListener<BulkResponse> listener) { AbstractRetryHandler(Class<? extends Throwable> retryOnThrowable, BackoffPolicy backoffPolicy, Client client, ActionListener<BulkResponse> listener) {
this.retryOnThrowable = retryOnThrowable; this.retryOnThrowable = retryOnThrowable;
this.backoff = backoffPolicy.iterator(); this.backoff = backoffPolicy.iterator();
this.client = client; this.client = client;
@ -213,7 +213,7 @@ public class Retry {
} }
static class AsyncRetryHandler extends AbstractRetryHandler { static class AsyncRetryHandler extends AbstractRetryHandler {
public AsyncRetryHandler(Class<? extends Throwable> retryOnThrowable, BackoffPolicy backoffPolicy, Client client, ActionListener<BulkResponse> listener) { AsyncRetryHandler(Class<? extends Throwable> retryOnThrowable, BackoffPolicy backoffPolicy, Client client, ActionListener<BulkResponse> listener) {
super(retryOnThrowable, backoffPolicy, client, listener); super(retryOnThrowable, backoffPolicy, client, listener);
} }
} }
@ -226,7 +226,7 @@ public class Retry {
return new SyncRetryHandler(retryOnThrowable, backoffPolicy, client, actionFuture); return new SyncRetryHandler(retryOnThrowable, backoffPolicy, client, actionFuture);
} }
public SyncRetryHandler(Class<? extends Throwable> retryOnThrowable, BackoffPolicy backoffPolicy, Client client, PlainActionFuture<BulkResponse> actionFuture) { SyncRetryHandler(Class<? extends Throwable> retryOnThrowable, BackoffPolicy backoffPolicy, Client client, PlainActionFuture<BulkResponse> actionFuture) {
super(retryOnThrowable, backoffPolicy, client, actionFuture); super(retryOnThrowable, backoffPolicy, client, actionFuture);
this.actionFuture = actionFuture; this.actionFuture = actionFuture;
} }

View File

@ -306,7 +306,7 @@ public class WorkingBulkByScrollTask extends BulkByScrollTask implements Success
private final AtomicBoolean hasRun = new AtomicBoolean(false); private final AtomicBoolean hasRun = new AtomicBoolean(false);
private final AbstractRunnable delegate; private final AbstractRunnable delegate;
public RunOnce(AbstractRunnable delegate) { RunOnce(AbstractRunnable delegate) {
this.delegate = delegate; this.delegate = delegate;
} }

View File

@ -429,7 +429,7 @@ abstract class AbstractSearchAsyncAction<FirstResult extends SearchPhaseResult>
private final SearchPhaseController searchPhaseController; private final SearchPhaseController searchPhaseController;
private final AtomicArray<QuerySearchResultProvider> queryResults; private final AtomicArray<QuerySearchResultProvider> queryResults;
public FetchPhase(AtomicArray<QuerySearchResultProvider> queryResults, FetchPhase(AtomicArray<QuerySearchResultProvider> queryResults,
SearchPhaseController searchPhaseController) { SearchPhaseController searchPhaseController) {
this.fetchResults = new AtomicArray<>(queryResults.length()); this.fetchResults = new AtomicArray<>(queryResults.length());
this.searchPhaseController = searchPhaseController; this.searchPhaseController = searchPhaseController;

View File

@ -31,7 +31,7 @@ class ParsedScrollId {
private final ScrollIdForNode[] context; private final ScrollIdForNode[] context;
public ParsedScrollId(String source, String type, ScrollIdForNode[] context) { ParsedScrollId(String source, String type, ScrollIdForNode[] context) {
this.source = source; this.source = source;
this.type = type; this.type = type;
this.context = context; this.context = context;

View File

@ -23,7 +23,7 @@ class ScrollIdForNode {
private final String node; private final String node;
private final long scrollId; private final long scrollId;
public ScrollIdForNode(String node, long scrollId) { ScrollIdForNode(String node, long scrollId) {
this.node = node; this.node = node;
this.scrollId = scrollId; this.scrollId = scrollId;
} }

View File

@ -74,7 +74,7 @@ final class SearchDfsQueryThenFetchAsyncAction extends AbstractSearchAsyncAction
private final AtomicArray<DfsSearchResult> firstResults; private final AtomicArray<DfsSearchResult> firstResults;
private final Function<AtomicArray<QuerySearchResultProvider>, CheckedRunnable<Exception>> nextPhaseFactory; private final Function<AtomicArray<QuerySearchResultProvider>, CheckedRunnable<Exception>> nextPhaseFactory;
public DfsQueryPhase(AtomicArray<DfsSearchResult> firstResults, DfsQueryPhase(AtomicArray<DfsSearchResult> firstResults,
SearchPhaseController searchPhaseController, SearchPhaseController searchPhaseController,
Function<AtomicArray<QuerySearchResultProvider>, CheckedRunnable<Exception>> nextPhaseFactory) { Function<AtomicArray<QuerySearchResultProvider>, CheckedRunnable<Exception>> nextPhaseFactory) {
this.queryResult = new AtomicArray<>(firstResults.length()); this.queryResult = new AtomicArray<>(firstResults.length());

View File

@ -197,7 +197,7 @@ public class SearchTransportService extends AbstractLifecycleComponent {
static class SearchFreeContextRequest extends ScrollFreeContextRequest implements IndicesRequest { static class SearchFreeContextRequest extends ScrollFreeContextRequest implements IndicesRequest {
private OriginalIndices originalIndices; private OriginalIndices originalIndices;
public SearchFreeContextRequest() { SearchFreeContextRequest() {
} }
SearchFreeContextRequest(SearchRequest request, long id) { SearchFreeContextRequest(SearchRequest request, long id) {

View File

@ -47,7 +47,7 @@ public interface ActionFilter {
* filter chain. This base class should serve any action filter implementations that doesn't require * filter chain. This base class should serve any action filter implementations that doesn't require
* to apply async filtering logic. * to apply async filtering logic.
*/ */
public abstract static class Simple extends AbstractComponent implements ActionFilter { abstract class Simple extends AbstractComponent implements ActionFilter {
protected Simple(Settings settings) { protected Simple(Settings settings) {
super(settings); super(settings);

View File

@ -33,5 +33,5 @@ public interface ActionFilterChain<Request extends ActionRequest, Response exten
* Continue processing the request. Should only be called if a response has not been sent through * Continue processing the request. Should only be called if a response has not been sent through
* the given {@link ActionListener listener} * the given {@link ActionListener listener}
*/ */
void proceed(Task task, final String action, final Request request, final ActionListener<Response> listener); void proceed(Task task, String action, Request request, ActionListener<Response> listener);
} }

View File

@ -522,10 +522,10 @@ public abstract class TransportBroadcastByNodeAction<Request extends BroadcastRe
protected List<BroadcastShardOperationFailedException> exceptions; protected List<BroadcastShardOperationFailedException> exceptions;
protected List<ShardOperationResult> results; protected List<ShardOperationResult> results;
public NodeResponse() { NodeResponse() {
} }
public NodeResponse(String nodeId, NodeResponse(String nodeId,
int totalShards, int totalShards,
List<ShardOperationResult> results, List<ShardOperationResult> results,
List<BroadcastShardOperationFailedException> exceptions) { List<BroadcastShardOperationFailedException> exceptions) {

View File

@ -52,5 +52,5 @@ public abstract class TransportClusterInfoAction<Request extends ClusterInfoRequ
doMasterOperation(request, concreteIndices, state, listener); doMasterOperation(request, concreteIndices, state, listener);
} }
protected abstract void doMasterOperation(Request request, String[] concreteIndices, ClusterState state, final ActionListener<Response> listener); protected abstract void doMasterOperation(Request request, String[] concreteIndices, ClusterState state, ActionListener<Response> listener);
} }

View File

@ -575,7 +575,7 @@ public abstract class TransportReplicationAction<
private class ResponseListener implements ActionListener<TransportResponse.Empty> { private class ResponseListener implements ActionListener<TransportResponse.Empty> {
private final ReplicaResponse replicaResponse; private final ReplicaResponse replicaResponse;
public ResponseListener(ReplicaResponse replicaResponse) { ResponseListener(ReplicaResponse replicaResponse) {
this.replicaResponse = replicaResponse; this.replicaResponse = replicaResponse;
} }

View File

@ -402,10 +402,10 @@ public abstract class TransportTasksAction<
protected List<TaskOperationFailure> exceptions; protected List<TaskOperationFailure> exceptions;
protected List<TaskResponse> results; protected List<TaskResponse> results;
public NodeTasksResponse() { NodeTasksResponse() {
} }
public NodeTasksResponse(String nodeId, NodeTasksResponse(String nodeId,
List<TaskResponse> results, List<TaskResponse> results,
List<TaskOperationFailure> exceptions) { List<TaskOperationFailure> exceptions) {
this.nodeId = nodeId; this.nodeId = nodeId;

View File

@ -200,7 +200,7 @@ public final class TermVectorsFields extends Fields {
private long sumDocFreq; private long sumDocFreq;
private int docCount; private int docCount;
public TermVector(BytesReference termVectors, long readOffset) throws IOException { TermVector(BytesReference termVectors, long readOffset) throws IOException {
this.perFieldTermVectorInput = termVectors.streamInput(); this.perFieldTermVectorInput = termVectors.streamInput();
this.readOffset = readOffset; this.readOffset = readOffset;
reset(); reset();

View File

@ -577,7 +577,7 @@ public class TermVectorsRequest extends SingleShardRequest<TermVectorsRequest> i
out.writeLong(version); out.writeLong(version);
} }
public static enum Flag { public enum Flag {
// Do not change the order of these flags we use // Do not change the order of these flags we use
// the ordinal for encoding! Only append to the end! // the ordinal for encoding! Only append to the end!
Positions, Offsets, Payloads, FieldStatistics, TermStatistics Positions, Offsets, Payloads, FieldStatistics, TermStatistics

View File

@ -207,7 +207,7 @@ final class BootstrapChecks {
static class OsXFileDescriptorCheck extends FileDescriptorCheck { static class OsXFileDescriptorCheck extends FileDescriptorCheck {
public OsXFileDescriptorCheck() { OsXFileDescriptorCheck() {
// see constant OPEN_MAX defined in // see constant OPEN_MAX defined in
// /usr/include/sys/syslimits.h on OS X and its use in JVM // /usr/include/sys/syslimits.h on OS X and its use in JVM
// initialization in int os:init_2(void) defined in the JVM // initialization in int os:init_2(void) defined in the JVM
@ -258,7 +258,7 @@ final class BootstrapChecks {
private final boolean mlockallSet; private final boolean mlockallSet;
public MlockallCheck(final boolean mlockAllSet) { MlockallCheck(final boolean mlockAllSet) {
this.mlockallSet = mlockAllSet; this.mlockallSet = mlockAllSet;
} }
@ -360,7 +360,7 @@ final class BootstrapChecks {
// visible for testing // visible for testing
long getMaxMapCount(Logger logger) { long getMaxMapCount(Logger logger) {
final Path path = getProcSysVmMaxMapCountPath(); final Path path = getProcSysVmMaxMapCountPath();
try (final BufferedReader bufferedReader = getBufferedReader(path)) { try (BufferedReader bufferedReader = getBufferedReader(path)) {
final String rawProcSysVmMaxMapCount = readProcSysVmMaxMapCount(bufferedReader); final String rawProcSysVmMaxMapCount = readProcSysVmMaxMapCount(bufferedReader);
if (rawProcSysVmMaxMapCount != null) { if (rawProcSysVmMaxMapCount != null) {
try { try {

View File

@ -48,7 +48,7 @@ final class ESPolicy extends Policy {
final PermissionCollection dynamic; final PermissionCollection dynamic;
final Map<String,Policy> plugins; final Map<String,Policy> plugins;
public ESPolicy(PermissionCollection dynamic, Map<String,Policy> plugins, boolean filterBadDefaults) { ESPolicy(PermissionCollection dynamic, Map<String,Policy> plugins, boolean filterBadDefaults) {
this.template = Security.readPolicy(getClass().getResource(POLICY_RESOURCE), JarHell.parseClassPath()); this.template = Security.readPolicy(getClass().getResource(POLICY_RESOURCE), JarHell.parseClassPath());
this.untrusted = Security.readPolicy(getClass().getResource(UNTRUSTED_RESOURCE), new URL[0]); this.untrusted = Security.readPolicy(getClass().getResource(UNTRUSTED_RESOURCE), new URL[0]);
if (filterBadDefaults) { if (filterBadDefaults) {
@ -150,7 +150,7 @@ final class ESPolicy extends Policy {
* @param preImplies a test that is applied to a desired permission before checking if the bad default permission that * @param preImplies a test that is applied to a desired permission before checking if the bad default permission that
* this instance wraps implies the desired permission * this instance wraps implies the desired permission
*/ */
public BadDefaultPermission(final Permission badDefaultPermission, final Predicate<Permission> preImplies) { BadDefaultPermission(final Permission badDefaultPermission, final Predicate<Permission> preImplies) {
super(badDefaultPermission.getName()); super(badDefaultPermission.getName());
this.badDefaultPermission = badDefaultPermission; this.badDefaultPermission = badDefaultPermission;
this.preImplies = preImplies; this.preImplies = preImplies;

View File

@ -109,7 +109,7 @@ final class JNAKernel32Library {
private final ConsoleCtrlHandler handler; private final ConsoleCtrlHandler handler;
public NativeHandlerCallback(ConsoleCtrlHandler handler) { NativeHandlerCallback(ConsoleCtrlHandler handler) {
this.handler = handler; this.handler = handler;
} }
@ -155,11 +155,11 @@ final class JNAKernel32Library {
public static class SizeT extends IntegerType { public static class SizeT extends IntegerType {
public SizeT() { SizeT() {
this(0); this(0);
} }
public SizeT(long value) { SizeT(long value) {
super(Native.SIZE_T_SIZE, value); super(Native.SIZE_T_SIZE, value);
} }

View File

@ -154,7 +154,7 @@ final class SystemCallFilter {
public short len; // number of filters public short len; // number of filters
public Pointer filter; // filters public Pointer filter; // filters
public SockFProg(SockFilter filters[]) { SockFProg(SockFilter filters[]) {
len = (short) filters.length; len = (short) filters.length;
// serialize struct sock_filter * explicitly, its less confusing than the JNA magic we would need // serialize struct sock_filter * explicitly, its less confusing than the JNA magic we would need
Memory filter = new Memory(len * 8); Memory filter = new Memory(len * 8);

View File

@ -65,8 +65,8 @@ public abstract class Command implements Closeable {
this.close(); this.close();
} catch (final IOException e) { } catch (final IOException e) {
try ( try (
final StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw)) { PrintWriter pw = new PrintWriter(sw)) {
e.printStackTrace(pw); e.printStackTrace(pw);
terminal.println(sw.toString()); terminal.println(sw.toString());
} catch (final IOException impossible) { } catch (final IOException impossible) {

View File

@ -41,7 +41,7 @@ public interface ElasticsearchClient {
* @return A future allowing to get back the response. * @return A future allowing to get back the response.
*/ */
<Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> ActionFuture<Response> execute( <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> ActionFuture<Response> execute(
final Action<Request, Response, RequestBuilder> action, final Request request); Action<Request, Response, RequestBuilder> action, Request request);
/** /**
* Executes a generic action, denoted by an {@link Action}. * Executes a generic action, denoted by an {@link Action}.
@ -54,7 +54,7 @@ public interface ElasticsearchClient {
* @param <RequestBuilder> The request builder type. * @param <RequestBuilder> The request builder type.
*/ */
<Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> void execute( <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> void execute(
final Action<Request, Response, RequestBuilder> action, final Request request, ActionListener<Response> listener); Action<Request, Response, RequestBuilder> action, Request request, ActionListener<Response> listener);
/** /**
* Prepares a request builder to execute, specified by {@link Action}. * Prepares a request builder to execute, specified by {@link Action}.
@ -66,7 +66,7 @@ public interface ElasticsearchClient {
* @return The request builder, that can, at a later stage, execute the request. * @return The request builder, that can, at a later stage, execute the request.
*/ */
<Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> RequestBuilder prepareExecute( <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> RequestBuilder prepareExecute(
final Action<Request, Response, RequestBuilder> action); Action<Request, Response, RequestBuilder> action);
/** /**
* Returns the threadpool used to execute requests on this client * Returns the threadpool used to execute requests on this client

View File

@ -401,7 +401,7 @@ public abstract class AbstractClient extends AbstractComponent implements Client
doExecute(action, request, listener); doExecute(action, request, listener);
} }
protected abstract <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(final Action<Request, Response, RequestBuilder> action, final Request request, ActionListener<Response> listener); protected abstract <Request extends ActionRequest, Response extends ActionResponse, RequestBuilder extends ActionRequestBuilder<Request, Response, RequestBuilder>> void doExecute(Action<Request, Response, RequestBuilder> action, Request request, ActionListener<Response> listener);
@Override @Override
public ActionFuture<IndexResponse> index(final IndexRequest request) { public ActionFuture<IndexResponse> index(final IndexRequest request) {
@ -672,7 +672,7 @@ public abstract class AbstractClient extends AbstractComponent implements Client
private final ClusterAdmin clusterAdmin; private final ClusterAdmin clusterAdmin;
private final IndicesAdmin indicesAdmin; private final IndicesAdmin indicesAdmin;
public Admin(ElasticsearchClient client) { Admin(ElasticsearchClient client) {
this.clusterAdmin = new ClusterAdmin(client); this.clusterAdmin = new ClusterAdmin(client);
this.indicesAdmin = new IndicesAdmin(client); this.indicesAdmin = new IndicesAdmin(client);
} }
@ -692,7 +692,7 @@ public abstract class AbstractClient extends AbstractComponent implements Client
private final ElasticsearchClient client; private final ElasticsearchClient client;
public ClusterAdmin(ElasticsearchClient client) { ClusterAdmin(ElasticsearchClient client) {
this.client = client; this.client = client;
} }
@ -1218,7 +1218,7 @@ public abstract class AbstractClient extends AbstractComponent implements Client
private final ElasticsearchClient client; private final ElasticsearchClient client;
public IndicesAdmin(ElasticsearchClient client) { IndicesAdmin(ElasticsearchClient client) {
this.client = client; this.client = client;
} }

View File

@ -264,7 +264,7 @@ final class TransportClientNodesService extends AbstractComponent implements Clo
private volatile int i; private volatile int i;
public RetryListener(NodeListenerCallback<Response> callback, ActionListener<Response> listener, RetryListener(NodeListenerCallback<Response> callback, ActionListener<Response> listener,
List<DiscoveryNode> nodes, int index, TransportClient.HostFailureListener hostFailureListener) { List<DiscoveryNode> nodes, int index, TransportClient.HostFailureListener hostFailureListener) {
this.callback = callback; this.callback = callback;
this.listener = listener; this.listener = listener;

View File

@ -52,21 +52,21 @@ public abstract class AbstractDiffable<T extends Diffable<T>> implements Diffabl
/** /**
* Creates simple diff with changes * Creates simple diff with changes
*/ */
public CompleteDiff(T part) { CompleteDiff(T part) {
this.part = part; this.part = part;
} }
/** /**
* Creates simple diff without changes * Creates simple diff without changes
*/ */
public CompleteDiff() { CompleteDiff() {
this.part = null; this.part = null;
} }
/** /**
* Read simple diff from the stream * Read simple diff from the stream
*/ */
public CompleteDiff(Reader<T> reader, StreamInput in) throws IOException { CompleteDiff(Reader<T> reader, StreamInput in) throws IOException {
if (in.readBoolean()) { if (in.readBoolean()) {
this.part = reader.read(in); this.part = reader.read(in);
} else { } else {

View File

@ -64,7 +64,7 @@ public abstract class AbstractNamedDiffable<T extends NamedDiffable<T>> implemen
/** /**
* Creates simple diff with changes * Creates simple diff with changes
*/ */
public CompleteNamedDiff(T part) { CompleteNamedDiff(T part) {
this.part = part; this.part = part;
this.name = part.getWriteableName(); this.name = part.getWriteableName();
this.minimalSupportedVersion = part.getMinimalSupportedVersion(); this.minimalSupportedVersion = part.getMinimalSupportedVersion();
@ -73,7 +73,7 @@ public abstract class AbstractNamedDiffable<T extends NamedDiffable<T>> implemen
/** /**
* Creates simple diff without changes * Creates simple diff without changes
*/ */
public CompleteNamedDiff(String name, Version minimalSupportedVersion) { CompleteNamedDiff(String name, Version minimalSupportedVersion) {
this.part = null; this.part = null;
this.name = name; this.name = name;
this.minimalSupportedVersion = minimalSupportedVersion; this.minimalSupportedVersion = minimalSupportedVersion;
@ -82,7 +82,7 @@ public abstract class AbstractNamedDiffable<T extends NamedDiffable<T>> implemen
/** /**
* Read simple diff from the stream * Read simple diff from the stream
*/ */
public CompleteNamedDiff(Class<? extends T> tClass, String name, StreamInput in) throws IOException { CompleteNamedDiff(Class<? extends T> tClass, String name, StreamInput in) throws IOException {
if (in.readBoolean()) { if (in.readBoolean()) {
this.part = in.readNamedWriteable(tClass, name); this.part = in.readNamedWriteable(tClass, name);
this.minimalSupportedVersion = part.getMinimalSupportedVersion(); this.minimalSupportedVersion = part.getMinimalSupportedVersion();

View File

@ -713,7 +713,7 @@ public class ClusterState implements ToXContent, Diffable<ClusterState> {
private final Diff<ImmutableOpenMap<String, Custom>> customs; private final Diff<ImmutableOpenMap<String, Custom>> customs;
public ClusterStateDiff(ClusterState before, ClusterState after) { ClusterStateDiff(ClusterState before, ClusterState after) {
fromUuid = before.stateUUID; fromUuid = before.stateUUID;
toUuid = after.stateUUID; toUuid = after.stateUUID;
toVersion = after.version; toVersion = after.version;
@ -725,7 +725,7 @@ public class ClusterState implements ToXContent, Diffable<ClusterState> {
customs = DiffableUtils.diff(before.customs, after.customs, DiffableUtils.getStringKeySerializer(), CUSTOM_VALUE_SERIALIZER); customs = DiffableUtils.diff(before.customs, after.customs, DiffableUtils.getStringKeySerializer(), CUSTOM_VALUE_SERIALIZER);
} }
public ClusterStateDiff(StreamInput in, DiscoveryNode localNode) throws IOException { ClusterStateDiff(StreamInput in, DiscoveryNode localNode) throws IOException {
clusterName = new ClusterName(in); clusterName = new ClusterName(in);
fromUuid = in.readString(); fromUuid = in.readString();
toUuid = in.readString(); toUuid = in.readString();

View File

@ -246,7 +246,7 @@ public class ClusterStateObserver {
private final String masterNodeId; private final String masterNodeId;
private final long version; private final long version;
public StoredState(ClusterState clusterState) { StoredState(ClusterState clusterState) {
this.masterNodeId = clusterState.nodes().getMasterNodeId(); this.masterNodeId = clusterState.nodes().getMasterNodeId();
this.version = clusterState.version(); this.version = clusterState.version();
} }
@ -271,7 +271,7 @@ public class ClusterStateObserver {
public final Listener listener; public final Listener listener;
public final Predicate<ClusterState> statePredicate; public final Predicate<ClusterState> statePredicate;
public ObservingContext(Listener listener, Predicate<ClusterState> statePredicate) { ObservingContext(Listener listener, Predicate<ClusterState> statePredicate) {
this.listener = listener; this.listener = listener;
this.statePredicate = statePredicate; this.statePredicate = statePredicate;
} }

View File

@ -166,7 +166,7 @@ public final class DiffableUtils {
super(in, keySerializer, valueSerializer); super(in, keySerializer, valueSerializer);
} }
public JdkMapDiff(Map<K, T> before, Map<K, T> after, JdkMapDiff(Map<K, T> before, Map<K, T> after,
KeySerializer<K> keySerializer, ValueSerializer<K, T> valueSerializer) { KeySerializer<K> keySerializer, ValueSerializer<K, T> valueSerializer) {
super(keySerializer, valueSerializer); super(keySerializer, valueSerializer);
assert after != null && before != null; assert after != null && before != null;
@ -298,7 +298,7 @@ public final class DiffableUtils {
super(in, keySerializer, valueSerializer); super(in, keySerializer, valueSerializer);
} }
public ImmutableOpenIntMapDiff(ImmutableOpenIntMap<T> before, ImmutableOpenIntMap<T> after, ImmutableOpenIntMapDiff(ImmutableOpenIntMap<T> before, ImmutableOpenIntMap<T> after,
KeySerializer<Integer> keySerializer, ValueSerializer<Integer, T> valueSerializer) { KeySerializer<Integer> keySerializer, ValueSerializer<Integer, T> valueSerializer) {
super(keySerializer, valueSerializer); super(keySerializer, valueSerializer);
assert after != null && before != null; assert after != null && before != null;

View File

@ -199,7 +199,7 @@ public class ShardStateAction extends AbstractComponent {
private final ShardFailedClusterStateTaskExecutor shardFailedClusterStateTaskExecutor; private final ShardFailedClusterStateTaskExecutor shardFailedClusterStateTaskExecutor;
private final Logger logger; private final Logger logger;
public ShardFailedTransportHandler(ClusterService clusterService, ShardFailedClusterStateTaskExecutor shardFailedClusterStateTaskExecutor, Logger logger) { ShardFailedTransportHandler(ClusterService clusterService, ShardFailedClusterStateTaskExecutor shardFailedClusterStateTaskExecutor, Logger logger) {
this.clusterService = clusterService; this.clusterService = clusterService;
this.shardFailedClusterStateTaskExecutor = shardFailedClusterStateTaskExecutor; this.shardFailedClusterStateTaskExecutor = shardFailedClusterStateTaskExecutor;
this.logger = logger; this.logger = logger;
@ -365,7 +365,7 @@ public class ShardStateAction extends AbstractComponent {
private final ShardStartedClusterStateTaskExecutor shardStartedClusterStateTaskExecutor; private final ShardStartedClusterStateTaskExecutor shardStartedClusterStateTaskExecutor;
private final Logger logger; private final Logger logger;
public ShardStartedTransportHandler(ClusterService clusterService, ShardStartedClusterStateTaskExecutor shardStartedClusterStateTaskExecutor, Logger logger) { ShardStartedTransportHandler(ClusterService clusterService, ShardStartedClusterStateTaskExecutor shardStartedClusterStateTaskExecutor, Logger logger) {
this.clusterService = clusterService; this.clusterService = clusterService;
this.shardStartedClusterStateTaskExecutor = shardStartedClusterStateTaskExecutor; this.shardStartedClusterStateTaskExecutor = shardStartedClusterStateTaskExecutor;
this.logger = logger; this.logger = logger;

View File

@ -121,7 +121,7 @@ public interface AliasOrIndex {
} }
@Override @Override
public final void remove() { public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }

View File

@ -139,7 +139,7 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContent {
public static final ClusterBlock INDEX_WRITE_BLOCK = new ClusterBlock(8, "index write (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE)); public static final ClusterBlock INDEX_WRITE_BLOCK = new ClusterBlock(8, "index write (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.WRITE));
public static final ClusterBlock INDEX_METADATA_BLOCK = new ClusterBlock(9, "index metadata (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.METADATA_WRITE, ClusterBlockLevel.METADATA_READ)); public static final ClusterBlock INDEX_METADATA_BLOCK = new ClusterBlock(9, "index metadata (api)", false, false, RestStatus.FORBIDDEN, EnumSet.of(ClusterBlockLevel.METADATA_WRITE, ClusterBlockLevel.METADATA_READ));
public static enum State { public enum State {
OPEN((byte) 0), OPEN((byte) 0),
CLOSE((byte) 1); CLOSE((byte) 1);
@ -620,7 +620,7 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContent {
private final Diff<ImmutableOpenMap<String, Custom>> customs; private final Diff<ImmutableOpenMap<String, Custom>> customs;
private final Diff<ImmutableOpenIntMap<Set<String>>> inSyncAllocationIds; private final Diff<ImmutableOpenIntMap<Set<String>>> inSyncAllocationIds;
public IndexMetaDataDiff(IndexMetaData before, IndexMetaData after) { IndexMetaDataDiff(IndexMetaData before, IndexMetaData after) {
index = after.index.getName(); index = after.index.getName();
version = after.version; version = after.version;
routingNumShards = after.routingNumShards; routingNumShards = after.routingNumShards;
@ -634,7 +634,7 @@ public class IndexMetaData implements Diffable<IndexMetaData>, ToXContent {
DiffableUtils.getVIntKeySerializer(), DiffableUtils.StringSetValueSerializer.getInstance()); DiffableUtils.getVIntKeySerializer(), DiffableUtils.StringSetValueSerializer.getInstance());
} }
public IndexMetaDataDiff(StreamInput in) throws IOException { IndexMetaDataDiff(StreamInput in) throws IOException {
index = in.readString(); index = in.readString();
routingNumShards = in.readInt(); routingNumShards = in.readInt();
version = in.readLong(); version = in.readLong();

View File

@ -502,11 +502,11 @@ public class IndexNameExpressionResolver extends AbstractComponent {
this(state, options, System.currentTimeMillis(), preserveAliases); this(state, options, System.currentTimeMillis(), preserveAliases);
} }
public Context(ClusterState state, IndicesOptions options, long startTime) { Context(ClusterState state, IndicesOptions options, long startTime) {
this(state, options, startTime, false); this(state, options, startTime, false);
} }
public Context(ClusterState state, IndicesOptions options, long startTime, boolean preserveAliases) { Context(ClusterState state, IndicesOptions options, long startTime, boolean preserveAliases) {
this.state = state; this.state = state;
this.options = options; this.options = options;
this.startTime = startTime; this.startTime = startTime;
@ -754,7 +754,7 @@ public class IndexNameExpressionResolver extends AbstractComponent {
private final String defaultDateFormatterPattern; private final String defaultDateFormatterPattern;
private final DateTimeFormatter defaultDateFormatter; private final DateTimeFormatter defaultDateFormatter;
public DateMathExpressionResolver(Settings settings) { DateMathExpressionResolver(Settings settings) {
String defaultTimeZoneId = settings.get("date_math_expression_resolver.default_time_zone", "UTC"); String defaultTimeZoneId = settings.get("date_math_expression_resolver.default_time_zone", "UTC");
this.defaultTimeZone = DateTimeZone.forID(defaultTimeZoneId); this.defaultTimeZone = DateTimeZone.forID(defaultTimeZoneId);
defaultDateFormatterPattern = settings.get("date_math_expression_resolver.default_date_format", "YYYY.MM.dd"); defaultDateFormatterPattern = settings.get("date_math_expression_resolver.default_date_format", "YYYY.MM.dd");

View File

@ -600,7 +600,7 @@ public class MetaData implements Iterable<IndexMetaData>, Diffable<MetaData>, To
private Diff<ImmutableOpenMap<String, IndexTemplateMetaData>> templates; private Diff<ImmutableOpenMap<String, IndexTemplateMetaData>> templates;
private Diff<ImmutableOpenMap<String, Custom>> customs; private Diff<ImmutableOpenMap<String, Custom>> customs;
public MetaDataDiff(MetaData before, MetaData after) { MetaDataDiff(MetaData before, MetaData after) {
clusterUUID = after.clusterUUID; clusterUUID = after.clusterUUID;
version = after.version; version = after.version;
transientSettings = after.transientSettings; transientSettings = after.transientSettings;
@ -610,7 +610,7 @@ public class MetaData implements Iterable<IndexMetaData>, Diffable<MetaData>, To
customs = DiffableUtils.diff(before.customs, after.customs, DiffableUtils.getStringKeySerializer(), CUSTOM_VALUE_SERIALIZER); customs = DiffableUtils.diff(before.customs, after.customs, DiffableUtils.getStringKeySerializer(), CUSTOM_VALUE_SERIALIZER);
} }
public MetaDataDiff(StreamInput in) throws IOException { MetaDataDiff(StreamInput in) throws IOException {
clusterUUID = in.readString(); clusterUUID = in.readString();
version = in.readLong(); version = in.readLong();
transientSettings = Settings.readSettingsFromStream(in); transientSettings = Settings.readSettingsFromStream(in);

View File

@ -378,12 +378,12 @@ public class RoutingTable implements Iterable<IndexRoutingTable>, Diffable<Routi
private final Diff<ImmutableOpenMap<String, IndexRoutingTable>> indicesRouting; private final Diff<ImmutableOpenMap<String, IndexRoutingTable>> indicesRouting;
public RoutingTableDiff(RoutingTable before, RoutingTable after) { RoutingTableDiff(RoutingTable before, RoutingTable after) {
version = after.version; version = after.version;
indicesRouting = DiffableUtils.diff(before.indicesRouting, after.indicesRouting, DiffableUtils.getStringKeySerializer()); indicesRouting = DiffableUtils.diff(before.indicesRouting, after.indicesRouting, DiffableUtils.getStringKeySerializer());
} }
public RoutingTableDiff(StreamInput in) throws IOException { RoutingTableDiff(StreamInput in) throws IOException {
version = in.readLong(); version = in.readLong();
indicesRouting = DiffableUtils.readImmutableOpenMapDiff(in, DiffableUtils.getStringKeySerializer(), IndexRoutingTable::readFrom, indicesRouting = DiffableUtils.readImmutableOpenMapDiff(in, DiffableUtils.getStringKeySerializer(), IndexRoutingTable::readFrom,
IndexRoutingTable::readDiffFrom); IndexRoutingTable::readDiffFrom);

View File

@ -1052,7 +1052,7 @@ public class BalancedShardsAllocator extends AbstractComponent implements Shards
private int numShards = 0; private int numShards = 0;
private final RoutingNode routingNode; private final RoutingNode routingNode;
public ModelNode(RoutingNode routingNode) { ModelNode(RoutingNode routingNode) {
this.routingNode = routingNode; this.routingNode = routingNode;
} }
@ -1130,7 +1130,7 @@ public class BalancedShardsAllocator extends AbstractComponent implements Shards
private final Set<ShardRouting> shards = new HashSet<>(4); // expect few shards of same index to be allocated on same node private final Set<ShardRouting> shards = new HashSet<>(4); // expect few shards of same index to be allocated on same node
private int highestPrimary = -1; private int highestPrimary = -1;
public ModelIndex(String id) { ModelIndex(String id) {
this.id = id; this.id = id;
} }
@ -1187,7 +1187,7 @@ public class BalancedShardsAllocator extends AbstractComponent implements Shards
private final Balancer balancer; private final Balancer balancer;
private float pivotWeight; private float pivotWeight;
public NodeSorter(ModelNode[] modelNodes, WeightFunction function, Balancer balancer) { NodeSorter(ModelNode[] modelNodes, WeightFunction function, Balancer balancer) {
this.function = function; this.function = function;
this.balancer = balancer; this.balancer = balancer;
this.modelNodes = modelNodes; this.modelNodes = modelNodes;

View File

@ -582,7 +582,7 @@ public class ClusterService extends AbstractLifecycleComponent {
abstract static class SourcePrioritizedRunnable extends PrioritizedRunnable { abstract static class SourcePrioritizedRunnable extends PrioritizedRunnable {
protected final String source; protected final String source;
public SourcePrioritizedRunnable(Priority priority, String source) { SourcePrioritizedRunnable(Priority priority, String source) {
super(priority); super(priority);
this.source = source; this.source = source;
} }
@ -892,7 +892,7 @@ public class ClusterService extends AbstractLifecycleComponent {
public final List<UpdateTask> nonFailedTasks; public final List<UpdateTask> nonFailedTasks;
public final Map<Object, ClusterStateTaskExecutor.TaskResult> executionResults; public final Map<Object, ClusterStateTaskExecutor.TaskResult> executionResults;
public TaskOutputs(TaskInputs taskInputs, ClusterState previousClusterState, TaskOutputs(TaskInputs taskInputs, ClusterState previousClusterState,
ClusterState newClusterState, List<UpdateTask> nonFailedTasks, ClusterState newClusterState, List<UpdateTask> nonFailedTasks,
Map<Object, ClusterStateTaskExecutor.TaskResult> executionResults) { Map<Object, ClusterStateTaskExecutor.TaskResult> executionResults) {
this.taskInputs = taskInputs; this.taskInputs = taskInputs;
@ -982,7 +982,7 @@ public class ClusterService extends AbstractLifecycleComponent {
private final ClusterStateTaskListener listener; private final ClusterStateTaskListener listener;
private final Logger logger; private final Logger logger;
public SafeClusterStateTaskListener(ClusterStateTaskListener listener, Logger logger) { SafeClusterStateTaskListener(ClusterStateTaskListener listener, Logger logger) {
this.listener = listener; this.listener = listener;
this.logger = logger; this.logger = logger;
} }
@ -1029,7 +1029,7 @@ public class ClusterService extends AbstractLifecycleComponent {
private final AckedClusterStateTaskListener listener; private final AckedClusterStateTaskListener listener;
private final Logger logger; private final Logger logger;
public SafeAckedClusterStateTaskListener(AckedClusterStateTaskListener listener, Logger logger) { SafeAckedClusterStateTaskListener(AckedClusterStateTaskListener listener, Logger logger) {
super(listener, logger); super(listener, logger);
this.listener = listener; this.listener = listener;
this.logger = logger; this.logger = logger;

View File

@ -37,7 +37,7 @@ final class BytesReferenceStreamInput extends StreamInput {
private final int length; // the total size of the stream private final int length; // the total size of the stream
private int offset; // the current position of the stream private int offset; // the current position of the stream
public BytesReferenceStreamInput(BytesRefIterator iterator, final int length) throws IOException { BytesReferenceStreamInput(BytesRefIterator iterator, final int length) throws IOException {
this.iterator = iterator; this.iterator = iterator;
this.slice = iterator.next(); this.slice = iterator.next();
this.length = length; this.length = length;

View File

@ -166,7 +166,7 @@ public class Cache<K, V> {
Entry<K, V> after; Entry<K, V> after;
State state = State.NEW; State state = State.NEW;
public Entry(K key, V value, long writeTime) { Entry(K key, V value, long writeTime) {
this.key = key; this.key = key;
this.value = value; this.value = value;
this.writeTime = this.accessTime = writeTime; this.writeTime = this.accessTime = writeTime;

View File

@ -433,7 +433,7 @@ public final class CopyOnWriteHashMap<K, V> extends AbstractMap<K, V> {
private final Deque<Map.Entry<K, V>> entries; private final Deque<Map.Entry<K, V>> entries;
private final Deque<Node<K, V>> nodes; private final Deque<Node<K, V>> nodes;
public EntryIterator(Node<K, V> node) { EntryIterator(Node<K, V> node) {
entries = new ArrayDeque<>(); entries = new ArrayDeque<>();
nodes = new ArrayDeque<>(); nodes = new ArrayDeque<>();
node.visit(entries, nodes); node.visit(entries, nodes);

View File

@ -36,7 +36,7 @@ public class Iterators {
private final Iterator<? extends T>[] iterators; private final Iterator<? extends T>[] iterators;
private int index = 0; private int index = 0;
public ConcatenatedIterator(Iterator<? extends T>... iterators) { ConcatenatedIterator(Iterator<? extends T>... iterators) {
if (iterators == null) { if (iterators == null) {
throw new NullPointerException("iterators"); throw new NullPointerException("iterators");
} }

View File

@ -31,7 +31,7 @@ public enum SpatialStrategy implements Writeable {
private final String strategyName; private final String strategyName;
private SpatialStrategy(String strategyName) { SpatialStrategy(String strategyName) {
this.strategyName = strategyName; this.strategyName = strategyName;
} }

View File

@ -381,7 +381,7 @@ public abstract class ShapeBuilder extends ToXContentToBytes implements NamedWri
} }
} }
public static enum Orientation { public enum Orientation {
LEFT, LEFT,
RIGHT; RIGHT;
@ -427,7 +427,7 @@ public abstract class ShapeBuilder extends ToXContentToBytes implements NamedWri
/** /**
* Enumeration that lists all {@link GeoShapeType}s that can be handled * Enumeration that lists all {@link GeoShapeType}s that can be handled
*/ */
public static enum GeoShapeType { public enum GeoShapeType {
POINT("point"), POINT("point"),
MULTIPOINT("multipoint"), MULTIPOINT("multipoint"),
LINESTRING("linestring"), LINESTRING("linestring"),
@ -440,7 +440,7 @@ public abstract class ShapeBuilder extends ToXContentToBytes implements NamedWri
private final String shapename; private final String shapename;
private GeoShapeType(String shapename) { GeoShapeType(String shapename) {
this.shapename = shapename; this.shapename = shapename;
} }

View File

@ -30,7 +30,7 @@ class ConstantFactory<T> implements InternalFactory<T> {
private final Initializable<T> initializable; private final Initializable<T> initializable;
public ConstantFactory(Initializable<T> initializable) { ConstantFactory(Initializable<T> initializable) {
this.initializable = initializable; this.initializable = initializable;
} }

View File

@ -34,7 +34,7 @@ class DeferredLookups implements Lookups {
private final InjectorImpl injector; private final InjectorImpl injector;
private final List<Element> lookups = new ArrayList<>(); private final List<Element> lookups = new ArrayList<>();
public DeferredLookups(InjectorImpl injector) { DeferredLookups(InjectorImpl injector) {
this.injector = injector; this.injector = injector;
} }

View File

@ -36,7 +36,7 @@ final class EncounterImpl<T> implements TypeEncounter<T> {
private List<InjectionListener<? super T>> injectionListeners; // lazy private List<InjectionListener<? super T>> injectionListeners; // lazy
private boolean valid = true; private boolean valid = true;
public EncounterImpl(Errors errors, Lookups lookups) { EncounterImpl(Errors errors, Lookups lookups) {
this.errors = errors; this.errors = errors;
this.lookups = lookups; this.lookups = lookups;
} }

View File

@ -33,7 +33,7 @@ class ExposedKeyFactory<T> implements InternalFactory<T>, BindingProcessor.Creat
private final PrivateElements privateElements; private final PrivateElements privateElements;
private BindingImpl<T> delegate; private BindingImpl<T> delegate;
public ExposedKeyFactory(Key<T> key, PrivateElements privateElements) { ExposedKeyFactory(Key<T> key, PrivateElements privateElements) {
this.key = key; this.key = key;
this.privateElements = privateElements; this.privateElements = privateElements;
} }

View File

@ -115,7 +115,7 @@ class Initializer {
private final Object source; private final Object source;
private MembersInjectorImpl<T> membersInjector; private MembersInjectorImpl<T> membersInjector;
public InjectableReference(InjectorImpl injector, T instance, Object source) { InjectableReference(InjectorImpl injector, T instance, Object source) {
this.injector = injector; this.injector = injector;
this.instance = Objects.requireNonNull(instance, "instance"); this.instance = Objects.requireNonNull(instance, "instance");
this.source = Objects.requireNonNull(source, "source"); this.source = Objects.requireNonNull(source, "source");

View File

@ -86,7 +86,7 @@ class InjectionRequestProcessor extends AbstractProcessor {
final StaticInjectionRequest request; final StaticInjectionRequest request;
List<SingleMemberInjector> memberInjectors; List<SingleMemberInjector> memberInjectors;
public StaticInjection(InjectorImpl injector, StaticInjectionRequest request) { StaticInjection(InjectorImpl injector, StaticInjectionRequest request) {
this.injector = injector; this.injector = injector;
this.source = request.getSource(); this.source = request.getSource();
this.request = request; this.request = request;

View File

@ -33,11 +33,11 @@ class InternalFactoryToProviderAdapter<T> implements InternalFactory<T> {
private final Initializable<Provider<? extends T>> initializable; private final Initializable<Provider<? extends T>> initializable;
private final Object source; private final Object source;
public InternalFactoryToProviderAdapter(Initializable<Provider<? extends T>> initializable) { InternalFactoryToProviderAdapter(Initializable<Provider<? extends T>> initializable) {
this(initializable, SourceProvider.UNKNOWN_SOURCE); this(initializable, SourceProvider.UNKNOWN_SOURCE);
} }
public InternalFactoryToProviderAdapter( InternalFactoryToProviderAdapter(
Initializable<Provider<? extends T>> initializable, Object source) { Initializable<Provider<? extends T>> initializable, Object source) {
this.initializable = Objects.requireNonNull(initializable, "provider"); this.initializable = Objects.requireNonNull(initializable, "provider");
this.source = Objects.requireNonNull(source, "source"); this.source = Objects.requireNonNull(source, "source");

View File

@ -380,7 +380,7 @@ public class Key<T> {
} }
} }
static enum NullAnnotationStrategy implements AnnotationStrategy { enum NullAnnotationStrategy implements AnnotationStrategy {
INSTANCE; INSTANCE;
@Override @Override

View File

@ -30,7 +30,7 @@ class ProviderToInternalFactoryAdapter<T> implements Provider<T> {
private final InjectorImpl injector; private final InjectorImpl injector;
private final InternalFactory<? extends T> internalFactory; private final InternalFactory<? extends T> internalFactory;
public ProviderToInternalFactoryAdapter(InjectorImpl injector, ProviderToInternalFactoryAdapter(InjectorImpl injector,
InternalFactory<? extends T> internalFactory) { InternalFactory<? extends T> internalFactory) {
this.injector = injector; this.injector = injector;
this.internalFactory = internalFactory; this.internalFactory = internalFactory;

View File

@ -34,7 +34,7 @@ class SingleFieldInjector implements SingleMemberInjector {
final Dependency<?> dependency; final Dependency<?> dependency;
final InternalFactory<?> factory; final InternalFactory<?> factory;
public SingleFieldInjector(InjectorImpl injector, InjectionPoint injectionPoint, Errors errors) SingleFieldInjector(InjectorImpl injector, InjectionPoint injectionPoint, Errors errors)
throws ErrorsException { throws ErrorsException {
this.injectionPoint = injectionPoint; this.injectionPoint = injectionPoint;
this.field = (Field) injectionPoint.getMember(); this.field = (Field) injectionPoint.getMember();

View File

@ -34,7 +34,7 @@ class SingleMethodInjector implements SingleMemberInjector {
final SingleParameterInjector<?>[] parameterInjectors; final SingleParameterInjector<?>[] parameterInjectors;
final InjectionPoint injectionPoint; final InjectionPoint injectionPoint;
public SingleMethodInjector(InjectorImpl injector, InjectionPoint injectionPoint, Errors errors) SingleMethodInjector(InjectorImpl injector, InjectionPoint injectionPoint, Errors errors)
throws ErrorsException { throws ErrorsException {
this.injectionPoint = injectionPoint; this.injectionPoint = injectionPoint;
final Method method = (Method) injectionPoint.getMember(); final Method method = (Method) injectionPoint.getMember();

View File

@ -43,7 +43,7 @@ class AssistedConstructor<T> {
private final List<Parameter> allParameters; private final List<Parameter> allParameters;
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public AssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) { AssistedConstructor(Constructor<T> constructor, List<TypeLiteral<?>> parameterTypes) {
this.constructor = constructor; this.constructor = constructor;
Annotation[][] annotations = constructor.getParameterAnnotations(); Annotation[][] annotations = constructor.getParameterAnnotations();

View File

@ -39,7 +39,7 @@ class Parameter {
private final Annotation bindingAnnotation; private final Annotation bindingAnnotation;
private final boolean isProvider; private final boolean isProvider;
public Parameter(Type type, Annotation[] annotations) { Parameter(Type type, Annotation[] annotations) {
this.type = type; this.type = type;
this.bindingAnnotation = getBindingAnnotation(annotations); this.bindingAnnotation = getBindingAnnotation(annotations);
this.isAssisted = hasAssistedAnnotation(annotations); this.isAssisted = hasAssistedAnnotation(annotations);

View File

@ -34,11 +34,11 @@ class ParameterListKey {
private final List<Type> paramList; private final List<Type> paramList;
public ParameterListKey(List<Type> paramList) { ParameterListKey(List<Type> paramList) {
this.paramList = new ArrayList<>(paramList); this.paramList = new ArrayList<>(paramList);
} }
public ParameterListKey(Type[] types) { ParameterListKey(Type[] types) {
this(Arrays.asList(types)); this(Arrays.asList(types));
} }

View File

@ -24,7 +24,7 @@ package org.elasticsearch.common.inject.internal;
* @author Bob Lee * @author Bob Lee
*/ */
class NullOutputException extends NullPointerException { class NullOutputException extends NullPointerException {
public NullOutputException(String s) { NullOutputException(String s) {
super(s); super(s);
} }
} }

View File

@ -36,7 +36,7 @@ public abstract class AbstractMatcher<T> implements Matcher<T> {
private static class AndMatcher<T> extends AbstractMatcher<T> { private static class AndMatcher<T> extends AbstractMatcher<T> {
private final Matcher<? super T> a, b; private final Matcher<? super T> a, b;
public AndMatcher(Matcher<? super T> a, Matcher<? super T> b) { AndMatcher(Matcher<? super T> a, Matcher<? super T> b) {
this.a = a; this.a = a;
this.b = b; this.b = b;
} }
@ -67,7 +67,7 @@ public abstract class AbstractMatcher<T> implements Matcher<T> {
private static class OrMatcher<T> extends AbstractMatcher<T> { private static class OrMatcher<T> extends AbstractMatcher<T> {
private final Matcher<? super T> a, b; private final Matcher<? super T> a, b;
public OrMatcher(Matcher<? super T> a, Matcher<? super T> b) { OrMatcher(Matcher<? super T> a, Matcher<? super T> b) {
this.a = a; this.a = a;
this.b = b; this.b = b;
} }

View File

@ -113,7 +113,7 @@ public class Matchers {
private static class AnnotatedWithType extends AbstractMatcher<AnnotatedElement> { private static class AnnotatedWithType extends AbstractMatcher<AnnotatedElement> {
private final Class<? extends Annotation> annotationType; private final Class<? extends Annotation> annotationType;
public AnnotatedWithType(Class<? extends Annotation> annotationType) { AnnotatedWithType(Class<? extends Annotation> annotationType) {
this.annotationType = Objects.requireNonNull(annotationType, "annotation type"); this.annotationType = Objects.requireNonNull(annotationType, "annotation type");
checkForRuntimeRetention(annotationType); checkForRuntimeRetention(annotationType);
} }
@ -152,7 +152,7 @@ public class Matchers {
private static class AnnotatedWith extends AbstractMatcher<AnnotatedElement> { private static class AnnotatedWith extends AbstractMatcher<AnnotatedElement> {
private final Annotation annotation; private final Annotation annotation;
public AnnotatedWith(Annotation annotation) { AnnotatedWith(Annotation annotation) {
this.annotation = Objects.requireNonNull(annotation, "annotation"); this.annotation = Objects.requireNonNull(annotation, "annotation");
checkForRuntimeRetention(annotation.annotationType()); checkForRuntimeRetention(annotation.annotationType());
} }
@ -191,7 +191,7 @@ public class Matchers {
private static class SubclassesOf extends AbstractMatcher<Class> { private static class SubclassesOf extends AbstractMatcher<Class> {
private final Class<?> superclass; private final Class<?> superclass;
public SubclassesOf(Class<?> superclass) { SubclassesOf(Class<?> superclass) {
this.superclass = Objects.requireNonNull(superclass, "superclass"); this.superclass = Objects.requireNonNull(superclass, "superclass");
} }
@ -227,7 +227,7 @@ public class Matchers {
private static class Only extends AbstractMatcher<Object> { private static class Only extends AbstractMatcher<Object> {
private final Object value; private final Object value;
public Only(Object value) { Only(Object value) {
this.value = Objects.requireNonNull(value, "value"); this.value = Objects.requireNonNull(value, "value");
} }
@ -263,7 +263,7 @@ public class Matchers {
private static class IdenticalTo extends AbstractMatcher<Object> { private static class IdenticalTo extends AbstractMatcher<Object> {
private final Object value; private final Object value;
public IdenticalTo(Object value) { IdenticalTo(Object value) {
this.value = Objects.requireNonNull(value, "value"); this.value = Objects.requireNonNull(value, "value");
} }
@ -301,7 +301,7 @@ public class Matchers {
private final transient Package targetPackage; private final transient Package targetPackage;
private final String packageName; private final String packageName;
public InPackage(Package targetPackage) { InPackage(Package targetPackage) {
this.targetPackage = Objects.requireNonNull(targetPackage, "package"); this.targetPackage = Objects.requireNonNull(targetPackage, "package");
this.packageName = targetPackage.getName(); this.packageName = targetPackage.getName();
} }
@ -345,7 +345,7 @@ public class Matchers {
private static class InSubpackage extends AbstractMatcher<Class> { private static class InSubpackage extends AbstractMatcher<Class> {
private final String targetPackageName; private final String targetPackageName;
public InSubpackage(String targetPackageName) { InSubpackage(String targetPackageName) {
this.targetPackageName = targetPackageName; this.targetPackageName = targetPackageName;
} }
@ -384,7 +384,7 @@ public class Matchers {
private static class Returns extends AbstractMatcher<Method> { private static class Returns extends AbstractMatcher<Method> {
private final Matcher<? super Class<?>> returnType; private final Matcher<? super Class<?>> returnType;
public Returns(Matcher<? super Class<?>> returnType) { Returns(Matcher<? super Class<?>> returnType) {
this.returnType = Objects.requireNonNull(returnType, "return type matcher"); this.returnType = Objects.requireNonNull(returnType, "return type matcher");
} }

View File

@ -23,7 +23,7 @@ class NamedImpl implements Named {
private final String value; private final String value;
public NamedImpl(String value) { NamedImpl(String value) {
this.value = Objects.requireNonNull(value, "name"); this.value = Objects.requireNonNull(value, "name");
} }

View File

@ -34,7 +34,7 @@ public interface Writeable {
/** /**
* Write this into the {@linkplain StreamOutput}. * Write this into the {@linkplain StreamOutput}.
*/ */
void writeTo(final StreamOutput out) throws IOException; void writeTo(StreamOutput out) throws IOException;
/** /**
* Reference to a method that can write some object to a {@link StreamOutput}. * Reference to a method that can write some object to a {@link StreamOutput}.
@ -60,7 +60,7 @@ public interface Writeable {
* @param out Output to write the {@code value} too * @param out Output to write the {@code value} too
* @param value The value to add * @param value The value to add
*/ */
void write(final StreamOutput out, final V value) throws IOException; void write(StreamOutput out, V value) throws IOException;
} }
@ -86,7 +86,7 @@ public interface Writeable {
* *
* @param in Input to read the value from * @param in Input to read the value from
*/ */
V read(final StreamInput in) throws IOException; V read(StreamInput in) throws IOException;
} }

View File

@ -156,7 +156,7 @@ public class FiltersFunctionScoreQuery extends Query {
final Weight[] filterWeights; final Weight[] filterWeights;
final boolean needsScores; final boolean needsScores;
public CustomBoostFactorWeight(Query parent, Weight subQueryWeight, Weight[] filterWeights, boolean needsScores) throws IOException { CustomBoostFactorWeight(Query parent, Weight subQueryWeight, Weight[] filterWeights, boolean needsScores) throws IOException {
super(parent); super(parent);
this.subQueryWeight = subQueryWeight; this.subQueryWeight = subQueryWeight;
this.filterWeights = filterWeights; this.filterWeights = filterWeights;

View File

@ -109,7 +109,7 @@ public class FunctionScoreQuery extends Query {
final Weight subQueryWeight; final Weight subQueryWeight;
final boolean needsScores; final boolean needsScores;
public CustomBoostFactorWeight(Query parent, Weight subQueryWeight, boolean needsScores) throws IOException { CustomBoostFactorWeight(Query parent, Weight subQueryWeight, boolean needsScores) throws IOException {
super(parent); super(parent);
this.subQueryWeight = subQueryWeight; this.subQueryWeight = subQueryWeight;
this.needsScores = needsScores; this.needsScores = needsScores;

View File

@ -38,7 +38,7 @@ public class ScriptScoreFunction extends ScoreFunction {
protected int docid; protected int docid;
protected float score; protected float score;
public CannedScorer() { CannedScorer() {
super(null); super(null);
} }

View File

@ -57,7 +57,7 @@ final class PerThreadIDAndVersionLookup {
/** /**
* Initialize lookup for the provided segment * Initialize lookup for the provided segment
*/ */
public PerThreadIDAndVersionLookup(LeafReader reader) throws IOException { PerThreadIDAndVersionLookup(LeafReader reader) throws IOException {
TermsEnum termsEnum = null; TermsEnum termsEnum = null;
NumericDocValues versions = null; NumericDocValues versions = null;

View File

@ -170,7 +170,7 @@ public enum Recyclers {
} }
} }
final int slot() { int slot() {
final long id = Thread.currentThread().getId(); final long id = Thread.currentThread().getId();
// don't trust Thread.hashCode to have equiprobable low bits // don't trust Thread.hashCode to have equiprobable low bits
int slot = (int) BitMixer.mix64(id); int slot = (int) BitMixer.mix64(id);

View File

@ -40,7 +40,7 @@ public enum DateTimeUnit {
private final byte id; private final byte id;
private final Function<DateTimeZone, DateTimeField> fieldFunction; private final Function<DateTimeZone, DateTimeField> fieldFunction;
private DateTimeUnit(byte id, Function<DateTimeZone, DateTimeField> fieldFunction) { DateTimeUnit(byte id, Function<DateTimeZone, DateTimeField> fieldFunction) {
this.id = id; this.id = id;
this.fieldFunction = fieldFunction; this.fieldFunction = fieldFunction;
} }

View File

@ -563,7 +563,7 @@ public class Setting<T> extends ToXContentToBytes {
private final Logger logger; private final Logger logger;
private final Consumer<T> accept; private final Consumer<T> accept;
public Updater(Consumer<T> consumer, Logger logger, Consumer<T> accept) { Updater(Consumer<T> consumer, Logger logger, Consumer<T> accept) {
this.consumer = consumer; this.consumer = consumer;
this.logger = logger; this.logger = logger;
this.accept = accept; this.accept = accept;

View File

@ -36,7 +36,7 @@ final class BigByteArray extends AbstractBigArray implements ByteArray {
private byte[][] pages; private byte[][] pages;
/** Constructor. */ /** Constructor. */
public BigByteArray(long size, BigArrays bigArrays, boolean clearOnResize) { BigByteArray(long size, BigArrays bigArrays, boolean clearOnResize) {
super(BYTE_PAGE_SIZE, bigArrays, clearOnResize); super(BYTE_PAGE_SIZE, bigArrays, clearOnResize);
this.size = size; this.size = size;
pages = new byte[numPages(size)][]; pages = new byte[numPages(size)][];

View File

@ -35,7 +35,7 @@ final class BigDoubleArray extends AbstractBigArray implements DoubleArray {
private long[][] pages; private long[][] pages;
/** Constructor. */ /** Constructor. */
public BigDoubleArray(long size, BigArrays bigArrays, boolean clearOnResize) { BigDoubleArray(long size, BigArrays bigArrays, boolean clearOnResize) {
super(LONG_PAGE_SIZE, bigArrays, clearOnResize); super(LONG_PAGE_SIZE, bigArrays, clearOnResize);
this.size = size; this.size = size;
pages = new long[numPages(size)][]; pages = new long[numPages(size)][];

View File

@ -35,7 +35,7 @@ final class BigFloatArray extends AbstractBigArray implements FloatArray {
private int[][] pages; private int[][] pages;
/** Constructor. */ /** Constructor. */
public BigFloatArray(long size, BigArrays bigArrays, boolean clearOnResize) { BigFloatArray(long size, BigArrays bigArrays, boolean clearOnResize) {
super(INT_PAGE_SIZE, bigArrays, clearOnResize); super(INT_PAGE_SIZE, bigArrays, clearOnResize);
this.size = size; this.size = size;
pages = new int[numPages(size)][]; pages = new int[numPages(size)][];

View File

@ -35,7 +35,7 @@ final class BigIntArray extends AbstractBigArray implements IntArray {
private int[][] pages; private int[][] pages;
/** Constructor. */ /** Constructor. */
public BigIntArray(long size, BigArrays bigArrays, boolean clearOnResize) { BigIntArray(long size, BigArrays bigArrays, boolean clearOnResize) {
super(INT_PAGE_SIZE, bigArrays, clearOnResize); super(INT_PAGE_SIZE, bigArrays, clearOnResize);
this.size = size; this.size = size;
pages = new int[numPages(size)][]; pages = new int[numPages(size)][];

View File

@ -35,7 +35,7 @@ final class BigLongArray extends AbstractBigArray implements LongArray {
private long[][] pages; private long[][] pages;
/** Constructor. */ /** Constructor. */
public BigLongArray(long size, BigArrays bigArrays, boolean clearOnResize) { BigLongArray(long size, BigArrays bigArrays, boolean clearOnResize) {
super(LONG_PAGE_SIZE, bigArrays, clearOnResize); super(LONG_PAGE_SIZE, bigArrays, clearOnResize);
this.size = size; this.size = size;
pages = new long[numPages(size)][]; pages = new long[numPages(size)][];

View File

@ -35,7 +35,7 @@ final class BigObjectArray<T> extends AbstractBigArray implements ObjectArray<T>
private Object[][] pages; private Object[][] pages;
/** Constructor. */ /** Constructor. */
public BigObjectArray(long size, BigArrays bigArrays) { BigObjectArray(long size, BigArrays bigArrays) {
super(OBJECT_PAGE_SIZE, bigArrays, true); super(OBJECT_PAGE_SIZE, bigArrays, true);
this.size = size; this.size = size;
pages = new Object[numPages(size)][]; pages = new Object[numPages(size)][];

View File

@ -226,7 +226,7 @@ public class CollectionUtils {
private final List<T> in; private final List<T> in;
private final int distance; private final int distance;
public RotatedList(List<T> list, int distance) { RotatedList(List<T> list, int distance) {
if (distance < 0 || distance >= list.size()) { if (distance < 0 || distance >= list.size()) {
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }

View File

@ -161,7 +161,7 @@ public class LongObjectPagedHashMap<T> extends AbstractPagedHashMap implements I
} }
@Override @Override
public final void remove() { public void remove() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }

View File

@ -161,7 +161,7 @@ public class EsExecutors {
final AtomicInteger threadNumber = new AtomicInteger(1); final AtomicInteger threadNumber = new AtomicInteger(1);
final String namePrefix; final String namePrefix;
public EsThreadFactory(String namePrefix) { EsThreadFactory(String namePrefix) {
this.namePrefix = namePrefix; this.namePrefix = namePrefix;
SecurityManager s = System.getSecurityManager(); SecurityManager s = System.getSecurityManager();
group = (s != null) ? s.getThreadGroup() : group = (s != null) ? s.getThreadGroup() :
@ -189,7 +189,7 @@ public class EsExecutors {
ThreadPoolExecutor executor; ThreadPoolExecutor executor;
public ExecutorScalingQueue() { ExecutorScalingQueue() {
} }
@Override @Override

View File

@ -250,14 +250,14 @@ public class PrioritizedEsThreadPoolExecutor extends EsThreadPoolExecutor {
final Priority priority; final Priority priority;
final long insertionOrder; final long insertionOrder;
public PrioritizedFutureTask(Runnable runnable, Priority priority, T value, long insertionOrder) { PrioritizedFutureTask(Runnable runnable, Priority priority, T value, long insertionOrder) {
super(runnable, value); super(runnable, value);
this.task = runnable; this.task = runnable;
this.priority = priority; this.priority = priority;
this.insertionOrder = insertionOrder; this.insertionOrder = insertionOrder;
} }
public PrioritizedFutureTask(PrioritizedCallable<T> callable, long insertionOrder) { PrioritizedFutureTask(PrioritizedCallable<T> callable, long insertionOrder) {
super(callable); super(callable);
this.task = callable; this.task = callable;
this.priority = callable.priority(); this.priority = callable.priority();

View File

@ -267,7 +267,7 @@ public final class ConstructingObjectParser<Value, Context> extends AbstractObje
*/ */
private Value targetObject; private Value targetObject;
public Target(XContentParser parser) { Target(XContentParser parser) {
this.parser = parser; this.parser = parser;
} }
@ -360,7 +360,7 @@ public final class ConstructingObjectParser<Value, Context> extends AbstractObje
final ParseField field; final ParseField field;
final boolean required; final boolean required;
public ConstructorArgInfo(ParseField field, boolean required) { ConstructorArgInfo(ParseField field, boolean required) {
this.field = field; this.field = field;
this.required = required; this.required = required;
} }

Some files were not shown because too many files have changed in this diff Show More