Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import org.opensearch.action.ActionRequest;
import org.opensearch.cluster.node.DiscoveryNodes;
import org.opensearch.common.inject.Module;
import org.opensearch.common.settings.Setting;
import org.opensearch.common.settings.Settings;
import org.opensearch.common.settings.ClusterSettings;
Expand Down Expand Up @@ -102,6 +103,11 @@ public Map<String, ScheduledJobProvider> getIndexToJobProviders() {
return indexToJobProviders;
}

@Override
public Collection<Module> createGuiceModules() {
return List.of(new JobSchedulerPluginModule());
}

@Override
public Collection<SystemIndexDescriptor> getSystemIndexDescriptors(Settings settings) {
return List.of(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright OpenSearch Contributors
* 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.jobscheduler;

import org.opensearch.common.inject.AbstractModule;
import org.opensearch.jobscheduler.spi.utils.LockService;
import org.opensearch.jobscheduler.utils.LockServiceImpl;

/**
* Guice Module to manage JobScheduler related objects
*/
public class JobSchedulerPluginModule extends AbstractModule {

/**
* Constructor for JobSchedulerPluginModule
*/
public JobSchedulerPluginModule() {}

@Override
protected void configure() {
bind(LockService.class).to(LockServiceImpl.class);
}
}
Loading