1 /* $Id: LRemote.java 16 2008-12-02 09:31:01Z lavans $ */
\r
2 package com.lavans.luz2.lremote.annotation;
\r
4 import java.lang.annotation.ElementType;
\r
5 import java.lang.annotation.Retention;
\r
6 import java.lang.annotation.RetentionPolicy;
\r
7 import java.lang.annotation.Target;
\r
10 @Target({ElementType.TYPE, ElementType.METHOD})
\r
11 @Retention(RetentionPolicy.RUNTIME)
\r
12 public @interface LRemote {
\r
13 public static final String LOCAL="local";
\r
15 public enum Selector { ORDERED, ROUNDROBIN, GROUP, OTHERS };
\r
17 * Node group. Default is LOCAL.
\r
18 * Set "local", the method is executed in local servlet container.
\r
19 * Set groupname to execute the method in remote node.
\r
22 String group() default LOCAL;
\r
25 * Target node. Default is Target.ORDERED.
\r
26 * <ul>Single connector
\r
28 * <li>ROUNDROBIN</li>
\r
30 * <ul>Group connector
\r
31 * <li>GROUP: execute in all node of group include itself.</li>
\r
32 * <li>OTHERS: execute in all other node. Local server doesn't execute.</li>
\r
37 Selector selector() default Selector.ORDERED;
\r
40 * Synchronized flag. Default is true. For group connector only.
\r
41 * If set <code>false</code>, connector does not wait for remote execution,
\r
42 * and can't get any results. Logging is the only way for confirm method result.
\r
45 boolean sync() default true;
\r