Skip to content

Commit 64959b2

Browse files
committed
use lambda
1 parent a8e842a commit 64959b2

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

server/src/main/java/org/elasticsearch/search/SearchService.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ public SearchService(
404404
.addSettingsUpdateConsumer(QUERY_PHASE_PARALLEL_COLLECTION_ENABLED, this::setEnableQueryPhaseParallelCollection);
405405

406406
memoryAccountingBufferSize = MEMORY_ACCOUNTING_BUFFER_SIZE.get(settings).getBytes();
407-
clusterService.getClusterSettings().addSettingsUpdateConsumer(MEMORY_ACCOUNTING_BUFFER_SIZE, this::setMemoryAccountingBufferSize);
407+
clusterService.getClusterSettings()
408+
.addSettingsUpdateConsumer(MEMORY_ACCOUNTING_BUFFER_SIZE, newValue -> this.memoryAccountingBufferSize = newValue.getBytes());
408409
}
409410

410411
private void setEnableSearchWorkerThreads(boolean enableSearchWorkerThreads) {
@@ -419,10 +420,6 @@ private void setEnableQueryPhaseParallelCollection(boolean enableQueryPhaseParal
419420
this.enableQueryPhaseParallelCollection = enableQueryPhaseParallelCollection;
420421
}
421422

422-
private void setMemoryAccountingBufferSize(ByteSizeValue memoryAccountingBufferSize) {
423-
this.memoryAccountingBufferSize = memoryAccountingBufferSize.getBytes();
424-
}
425-
426423
private static void validateKeepAlives(TimeValue defaultKeepAlive, TimeValue maxKeepAlive) {
427424
if (defaultKeepAlive.millis() > maxKeepAlive.millis()) {
428425
throw new IllegalArgumentException(

0 commit comments

Comments
 (0)