Skip to content

Commit e57a481

Browse files
committed
Whitespace diff reduction
Signed-off-by: Daniel Widdis <widdis@gmail.com>
1 parent ffa6b38 commit e57a481

1 file changed

Lines changed: 30 additions & 44 deletions

File tree

src/main/java/org/opensearch/sdk/ExtensionsRunner.java

Lines changed: 30 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@
8080
/**
8181
* The primary class to run an extension.
8282
* <p>
83-
* This class Javadoc will eventually be expanded with a full
84-
* description/tutorial for users.
83+
* This class Javadoc will eventually be expanded with a full description/tutorial for users.
8584
*/
8685
public class ExtensionsRunner {
8786

@@ -152,7 +151,7 @@ public ExtensionsRunner() throws IOException {
152151
/**
153152
* Instantiates a new Extensions Runner using the specified extension.
154153
*
155-
* @param extension The settings with which to start the runner.
154+
* @param extension The settings with which to start the runner.
156155
* @throws IOException if the runner failed to read settings or API.
157156
*/
158157
private ExtensionsRunner(Extension extension) throws IOException {
@@ -215,13 +214,10 @@ DiscoveryNode getOpensearchNode() {
215214
}
216215

217216
/**
218-
* Initializes a Netty4Transport object. This object will be wrapped in a
219-
* {@link TransportService} object.
217+
* Initializes a Netty4Transport object. This object will be wrapped in a {@link TransportService} object.
220218
*
221-
* @param settings
222-
* The transport settings to configure.
223-
* @param threadPool
224-
* A thread pool to use.
219+
* @param settings The transport settings to configure.
220+
* @param threadPool A thread pool to use.
225221
* @return The configured Netty4Transport object.
226222
*/
227223
public Netty4Transport getNetty4Transport(Settings settings, ThreadPool threadPool) {
@@ -257,10 +253,9 @@ public Netty4Transport getNetty4Transport(Settings settings, ThreadPool threadPo
257253
}
258254

259255
/**
260-
* Initializes the TransportService object for this extension. This object will
261-
* control communication between the extension and OpenSearch.
256+
* Initializes the TransportService object for this extension. This object will control communication between the extension and OpenSearch.
262257
*
263-
* @param settings The transport settings to configure.
258+
* @param settings The transport settings to configure.
264259
* @return The initialized TransportService object.
265260
*/
266261
public TransportService initializeExtensionTransportService(Settings settings) {
@@ -298,16 +293,15 @@ public TransportService initializeExtensionTransportService(Settings settings) {
298293
/**
299294
* Starts a TransportService.
300295
*
301-
* @param transportService The TransportService to start.
296+
* @param transportService The TransportService to start.
302297
*/
303298
public void startTransportService(TransportService transportService) {
304299
// start transport service and accept incoming requests
305300
transportService.start();
306301
transportService.acceptIncomingRequests();
307302

308303
// Extension Request is the first request for the transport communication.
309-
// This request will initialize the extension and will be a part of OpenSearch
310-
// bootstrap
304+
// This request will initialize the extension and will be a part of OpenSearch bootstrap
311305
transportService.registerRequestHandler(
312306
ExtensionsOrchestrator.REQUEST_EXTENSION_ACTION_NAME,
313307
ThreadPool.Names.GENERIC,
@@ -381,7 +375,7 @@ public void startTransportService(TransportService transportService) {
381375
/**
382376
* Requests that OpenSearch register the REST Actions for this extension.
383377
*
384-
* @param transportService The TransportService defining the connection to OpenSearch.
378+
* @param transportService The TransportService defining the connection to OpenSearch.
385379
*/
386380
public void sendRegisterRestActionsRequest(TransportService transportService) {
387381
List<String> extensionRestPaths = extensionRestPathRegistry.getRegisteredPaths();
@@ -402,7 +396,7 @@ public void sendRegisterRestActionsRequest(TransportService transportService) {
402396
/**
403397
* Requests that OpenSearch register the custom settings for this extension.
404398
*
405-
* @param transportService The TransportService defining the connection to OpenSearch.
399+
* @param transportService The TransportService defining the connection to OpenSearch.
406400
*/
407401
public void sendRegisterCustomSettingsRequest(TransportService transportService) {
408402
logger.info("Sending Settings request to OpenSearch");
@@ -420,8 +414,7 @@ public void sendRegisterCustomSettingsRequest(TransportService transportService)
420414
}
421415

422416
/**
423-
* Requests the cluster state from OpenSearch. The result will be handled by a
424-
* {@link ClusterStateResponseHandler}.
417+
* Requests the cluster state from OpenSearch. The result will be handled by a {@link ClusterStateResponseHandler}.
425418
*
426419
* @param transportService The TransportService defining the connection to OpenSearch.
427420
*/
@@ -441,10 +434,9 @@ public void sendClusterStateRequest(TransportService transportService) {
441434
}
442435

443436
/**
444-
* Requests the cluster settings from OpenSearch. The result will be handled by
445-
* a {@link ClusterSettingsResponseHandler}.
437+
* Requests the cluster settings from OpenSearch. The result will be handled by a {@link ClusterSettingsResponseHandler}.
446438
*
447-
* @param transportService The TransportService defining the connection to OpenSearch.
439+
* @param transportService The TransportService defining the connection to OpenSearch.
448440
*/
449441
public void sendClusterSettingsRequest(TransportService transportService) {
450442
logger.info("Sending Cluster Settings request to OpenSearch");
@@ -462,10 +454,9 @@ public void sendClusterSettingsRequest(TransportService transportService) {
462454
}
463455

464456
/**
465-
* Requests the local node from OpenSearch. The result will be handled by a
466-
* {@link LocalNodeResponseHandler}.
457+
* Requests the local node from OpenSearch. The result will be handled by a {@link LocalNodeResponseHandler}.
467458
*
468-
* @param transportService The TransportService defining the connection to OpenSearch.
459+
* @param transportService The TransportService defining the connection to OpenSearch.
469460
*/
470461
public void sendLocalNodeRequest(TransportService transportService) {
471462
logger.info("Sending Local Node request to OpenSearch");
@@ -483,11 +474,10 @@ public void sendLocalNodeRequest(TransportService transportService) {
483474
}
484475

485476
/**
486-
* Requests the ActionListener onFailure method to be run by OpenSearch. The
487-
* result will be handled by a {@link ActionListenerOnFailureResponseHandler}.
477+
* Requests the ActionListener onFailure method to be run by OpenSearch. The result will be handled by a {@link ActionListenerOnFailureResponseHandler}.
488478
*
489-
* @param transportService The TransportService defining the connection to OpenSearch.
490-
* @param failureException The exception to be sent to OpenSearch
479+
* @param transportService The TransportService defining the connection to OpenSearch.
480+
* @param failureException The exception to be sent to OpenSearch
491481
*/
492482
public void sendActionListenerOnFailureRequest(TransportService transportService, Exception failureException) {
493483
logger.info("Sending ActionListener onFailure request to OpenSearch");
@@ -505,12 +495,10 @@ public void sendActionListenerOnFailureRequest(TransportService transportService
505495
}
506496

507497
/**
508-
* Requests the environment setting values from OpenSearch for the corresponding
509-
* component settings. The result will be handled by a
510-
* {@link EnvironmentSettingsResponseHandler}.
498+
* Requests the environment setting values from OpenSearch for the corresponding component settings. The result will be handled by a {@link EnvironmentSettingsResponseHandler}.
511499
*
512-
* @param componentSettings The component setting that correspond to the values provided by the environment settings
513-
* @param transportService The TransportService defining the connection to OpenSearch.
500+
* @param componentSettings The component setting that correspond to the values provided by the environment settings
501+
* @param transportService The TransportService defining the connection to OpenSearch.
514502
*/
515503
public void sendEnvironmentSettingsRequest(TransportService transportService, List<Setting<?>> componentSettings) {
516504
logger.info("Sending Environment Settings request to OpenSearch");
@@ -528,13 +516,12 @@ public void sendEnvironmentSettingsRequest(TransportService transportService, Li
528516
}
529517

530518
/**
531-
* Registers settings and setting consumers with the
532-
* {@link UpdateSettingsRequestHandler} and then sends a request to OpenSearch
533-
* to register these Setting objects with a callback to this extension. The
519+
* Registers settings and setting consumers with the {@link UpdateSettingsRequestHandler} and then sends a request to OpenSearch to register these Setting objects with a callback to this extension.
520+
* The
534521
* result will be handled by a {@link ExtensionBooleanResponseHandler}.
535522
*
536-
* @param transportService The TransportService defining the connection to OpenSearch.
537-
* @param settingUpdateConsumers A map of setting objects and their corresponding consumers
523+
* @param transportService The TransportService defining the connection to OpenSearch.
524+
* @param settingUpdateConsumers A map of setting objects and their corresponding consumers
538525
* @throws Exception if there are no setting update consumers within the settingUpdateConsumers map
539526
*/
540527
public void sendAddSettingsUpdateConsumerRequest(TransportService transportService, Map<Setting<?>, Consumer<?>> settingUpdateConsumers)
@@ -575,7 +562,7 @@ private Settings getSettings() {
575562
/**
576563
* Starts an ActionListener.
577564
*
578-
* @param timeout The timeout for the listener in milliseconds. A timeout of 0 means no timeout.
565+
* @param timeout The timeout for the listener in milliseconds. A timeout of 0 means no timeout.
579566
*/
580567
public void startActionListener(int timeout) {
581568
final ActionListener actionListener = new ActionListener();
@@ -585,8 +572,8 @@ public void startActionListener(int timeout) {
585572
/**
586573
* Runs the specified extension.
587574
*
588-
* @param extension The extension to run.
589-
* @throws IOException on failure to bind ports.
575+
* @param extension The extension to run.
576+
* @throws IOException on failure to bind ports.
590577
*/
591578
public static void run(Extension extension) throws IOException {
592579
logger.info("Starting extension " + extension.getExtensionSettings().getExtensionName());
@@ -595,8 +582,7 @@ public static void run(Extension extension) throws IOException {
595582
}
596583

597584
/**
598-
* Run the Extension. For internal/testing purposes only. Imports settings and
599-
* sets up Transport Service listening for incoming connections.
585+
* Run the Extension. For internal/testing purposes only. Imports settings and sets up Transport Service listening for incoming connections.
600586
*
601587
* @param args Unused
602588
* @throws IOException if the runner failed to connect to the OpenSearch cluster.

0 commit comments

Comments
 (0)