Metadata
Task Execution
Attribute Annotation | @TaskGigaSpace |
Description | This annotation injects a clustered proxy into the Task implementation. This is useful when the Task should access other partitions. |
Example:
public class MyTask implements Task<Integer> {
@TaskGigaSpace
private transient GigaSpace colocatedSpace;
private transient GigaSpace clusteredSpace;
public MyTask() {
}
....
}
Task Routing
Method Annotation | @SpaceRouting |
Description | This annotation selects the routing The mechanism that is in charge of routing the objects into and out of the corresponding partitions. The routing is based on a designated attribute inside the objects that are written to the Space, called the Routing Index. value. In case it is a POJO Plain Old Java Object. A regular Java object with no special restrictions other than those forced by the Java Language Specification and does not require any classpath. defined with a @SpaceRouting on one of its properties, the value of that property will be used as the routing information when passed as a parameter. |
Example:
public class MyTask implements Task<Integer> {
@SpaceRouting
public Integer routing() {
return this.value;
}
....
}