-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ashish Singh <[email protected]>
- Loading branch information
Showing
8 changed files
with
196 additions
and
244 deletions.
There are no files selected for viewing
46 changes: 0 additions & 46 deletions
46
.../main/java/org/opensearch/gateway/remote/IndexCreationPreIndexMetadataUploadListener.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
server/src/main/java/org/opensearch/gateway/remote/IndexMetadataUploadInterceptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.gateway.remote; | ||
|
||
import org.opensearch.cluster.metadata.IndexMetadata; | ||
import org.opensearch.core.action.ActionListener; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
/** | ||
* Hook for running code that needs to be executed before the upload of index metadata. Here we have introduced a hook | ||
* for index creation (also triggerred after enabling the remote cluster statement for the first time). The Interceptor | ||
* is intended to be run in parallel and async with the index metadata upload. | ||
* | ||
* @opensearch.internal | ||
*/ | ||
public interface IndexMetadataUploadInterceptor { | ||
|
||
/** | ||
* Intercepts the index metadata upload flow with input containing index metadata of new indexes (or first time upload). | ||
* The caller is expected to trigger onSuccess or onFailure of the {@code ActionListener}. | ||
* | ||
* @param indexMetadataList list of index metadata of new indexes (or first time index metadata upload). | ||
* @param actionListener listener to be invoked on success or failure. | ||
*/ | ||
void interceptIndexCreation(List<IndexMetadata> indexMetadataList, ActionListener<Void> actionListener) throws IOException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.