diff --git a/services-api/src/main/java/io/scalecube/services/annotations/ExecuteOn.java b/services-api/src/main/java/io/scalecube/services/annotations/ExecuteOn.java new file mode 100644 index 000000000..bdc7fec66 --- /dev/null +++ b/services-api/src/main/java/io/scalecube/services/annotations/ExecuteOn.java @@ -0,0 +1,27 @@ +package io.scalecube.services.annotations; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Documented; +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * This annotation is used to mark that particular service method or all service methods will be + * executed in the specified scheduler. + */ +@Documented +@Target({METHOD, TYPE}) +@Retention(RUNTIME) +public @interface ExecuteOn { + + /** + * Returns {@link reactor.core.scheduler.Scheduler} spec, in the format: {@code + * :} + * + * @return scheduler spec + */ + String value(); +} diff --git a/services-api/src/main/java/io/scalecube/services/annotations/Service.java b/services-api/src/main/java/io/scalecube/services/annotations/Service.java index f4fe35534..bbbf194ee 100644 --- a/services-api/src/main/java/io/scalecube/services/annotations/Service.java +++ b/services-api/src/main/java/io/scalecube/services/annotations/Service.java @@ -5,7 +5,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -/** Indicates that an annotated class is an Service Fabric service object. */ +/** Indicates that annotated class is a ScaleCube service object. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface Service { diff --git a/services-api/src/main/java/io/scalecube/services/annotations/ServiceMethod.java b/services-api/src/main/java/io/scalecube/services/annotations/ServiceMethod.java index ffeb2a85c..e4544333a 100644 --- a/services-api/src/main/java/io/scalecube/services/annotations/ServiceMethod.java +++ b/services-api/src/main/java/io/scalecube/services/annotations/ServiceMethod.java @@ -6,7 +6,7 @@ import java.lang.annotation.Target; /** - * Indicates that an annotated method is a service method available via Service Fabric framework. + * Indicates that annotated method is a ScaleCube service method. */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})