Skip to content

Commit

Permalink
Move all spi interface to api module
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Nov 1, 2023
1 parent 6ca1a3a commit 066b556
Show file tree
Hide file tree
Showing 146 changed files with 209 additions and 201 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.executor;
package org.apache.shardingsphere.elasticjob.spi.executor;

/**
* Execution type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.executor.error.handler;
package org.apache.shardingsphere.elasticjob.spi.executor.error.handler;

import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.executor.error.handler;
package org.apache.shardingsphere.elasticjob.spi.executor.error.handler;

import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.spi.executor;
package org.apache.shardingsphere.elasticjob.spi.executor.item;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.api.JobConfiguration;
import org.apache.shardingsphere.elasticjob.spi.executor.param.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.executor.param.JobRuntimeService;
import org.apache.shardingsphere.elasticjob.spi.executor.item.param.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.executor.item.param.JobRuntimeService;

/**
* Job item executor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.spi.executor.param;
package org.apache.shardingsphere.elasticjob.spi.executor.item.param;

/**
* Job runtime service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.spi.executor.param;
package org.apache.shardingsphere.elasticjob.spi.executor.item.param;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.spi.executor.type;
package org.apache.shardingsphere.elasticjob.spi.executor.item.type;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.spi.executor.JobItemExecutor;
import org.apache.shardingsphere.elasticjob.spi.executor.item.JobItemExecutor;
import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.spi.executor.type;
package org.apache.shardingsphere.elasticjob.spi.executor.item.type;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.spi.executor.JobItemExecutor;
import org.apache.shardingsphere.elasticjob.spi.executor.item.JobItemExecutor;
import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.apache.shardingsphere.elasticjob.spi.executor.param.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.executor.item.param.ShardingContext;

import java.io.Serializable;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.tracing.event;
package org.apache.shardingsphere.elasticjob.spi.tracing.event;

/**
* Job event.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.tracing.event;
package org.apache.shardingsphere.elasticjob.spi.tracing.event;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.tracing.event;
package org.apache.shardingsphere.elasticjob.spi.tracing.event;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.apache.shardingsphere.elasticjob.kernel.executor.ExecutionType;
import org.apache.shardingsphere.elasticjob.spi.executor.ExecutionType;

import java.util.Date;
import java.util.UUID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.tracing.exception;
package org.apache.shardingsphere.elasticjob.spi.tracing.exception;

/**
* Tracing configuration exception.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.tracing.listener;
package org.apache.shardingsphere.elasticjob.spi.tracing.listener;

import com.google.common.eventbus.AllowConcurrentEvents;
import com.google.common.eventbus.Subscribe;
import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobExecutionEvent;
import org.apache.shardingsphere.elasticjob.kernel.tracing.event.JobStatusTraceEvent;
import org.apache.shardingsphere.elasticjob.spi.tracing.event.JobExecutionEvent;
import org.apache.shardingsphere.elasticjob.spi.tracing.event.JobStatusTraceEvent;

/**
* Tracing listener.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.tracing.listener;
package org.apache.shardingsphere.elasticjob.spi.tracing.listener;

import org.apache.shardingsphere.elasticjob.kernel.tracing.exception.TracingConfigurationException;
import org.apache.shardingsphere.elasticjob.spi.tracing.exception.TracingConfigurationException;
import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.tracing.config;
package org.apache.shardingsphere.elasticjob.spi.tracing.storage;

/**
* Tracing storage configuration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,25 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.tracing.storage;
package org.apache.shardingsphere.elasticjob.spi.tracing.storage;

import org.apache.shardingsphere.elasticjob.kernel.tracing.config.TracingStorageConfiguration;
import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;

/**
* Tracing storage converter.
* Tracing storage configuration converter.
*
* @param <T> storage type
*/
@SingletonSPI
public interface TracingStorageConverter<T> {
public interface TracingStorageConfigurationConverter<T> {

/**
* Convert storage to {@link TracingStorageConfiguration}.
*
* @param storage storage instance
* @return instance of {@link TracingStorageConfiguration}
*/
TracingStorageConfiguration<T> convertToConfiguration(T storage);
TracingStorageConfiguration<T> toConfiguration(T storage);

/**
* Storage type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.infra.yaml.config;
package org.apache.shardingsphere.elasticjob.spi.yaml;

import java.io.Serializable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.shardingsphere.elasticjob.kernel.infra.yaml.config;
package org.apache.shardingsphere.elasticjob.spi.yaml;

import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.annotation.job;

import org.apache.shardingsphere.elasticjob.api.ElasticJob;
import org.apache.shardingsphere.elasticjob.spi.executor.param.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.executor.item.param.ShardingContext;

public interface CustomJob extends ElasticJob {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.apache.shardingsphere.elasticjob.annotation.ElasticJobProp;
import org.apache.shardingsphere.elasticjob.annotation.SimpleTracingConfigurationFactory;
import org.apache.shardingsphere.elasticjob.annotation.job.CustomJob;
import org.apache.shardingsphere.elasticjob.spi.executor.param.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.executor.item.param.ShardingContext;

@ElasticJobConfiguration(
cron = "0/5 * * * * ?",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.shardingsphere.elasticjob.spi.listener.param;

import org.apache.shardingsphere.elasticjob.spi.executor.param.ShardingContext;
import org.apache.shardingsphere.elasticjob.spi.executor.item.param.ShardingContext;
import org.junit.jupiter.api.Test;

import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.shardingsphere.elasticjob.kernel.infra.json.GsonFactory;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;

import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.dingtalk;

import org.apache.shardingsphere.elasticjob.kernel.infra.exception.PropertiesPreconditions;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandlerPropertiesValidator;

import java.util.Properties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.shardingsphere.elasticjob.error.handler.dingtalk;

import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.core.read.ListAppender;
import org.apache.shardingsphere.elasticjob.error.handler.dingtalk.fixture.DingtalkInternalController;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.restful.NettyRestfulService;
import org.apache.shardingsphere.elasticjob.restful.NettyRestfulServiceConfiguration;
import org.apache.shardingsphere.elasticjob.restful.RestfulService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.google.common.base.Strings;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;

import javax.mail.Authenticator;
import javax.mail.BodyPart;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.email;

import org.apache.shardingsphere.elasticjob.kernel.infra.exception.PropertiesPreconditions;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandlerPropertiesValidator;

import java.util.Properties;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.shardingsphere.elasticjob.error.handler.email;

import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.core.read.ListAppender;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.test.util.ReflectionUtils;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.junit.jupiter.api.BeforeAll;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.shardingsphere.elasticjob.error.handler.normal;

import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;

/**
* Job error handler for ignore exception.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.normal;

import lombok.extern.slf4j.Slf4j;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;

/**
* Job error handler for log error message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.normal;

import org.apache.shardingsphere.elasticjob.kernel.infra.exception.JobSystemException;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;

/**
* Job error handler for throw exception.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.shardingsphere.elasticjob.error.handler.normal;

import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.LoggingEvent;
import ch.qos.logback.core.read.ListAppender;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.normal;

import org.apache.shardingsphere.elasticjob.kernel.infra.exception.JobSystemException;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import org.apache.shardingsphere.elasticjob.kernel.infra.json.GsonFactory;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandler;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandler;

import java.io.IOException;
import java.io.PrintWriter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package org.apache.shardingsphere.elasticjob.error.handler.wechat;

import org.apache.shardingsphere.elasticjob.kernel.infra.exception.PropertiesPreconditions;
import org.apache.shardingsphere.elasticjob.kernel.executor.error.handler.JobErrorHandlerPropertiesValidator;
import org.apache.shardingsphere.elasticjob.spi.executor.error.handler.JobErrorHandlerPropertiesValidator;

import java.util.Properties;

Expand Down
Loading

0 comments on commit 066b556

Please sign in to comment.