KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > rmi > Consts


1 package org.sapia.ubik.rmi;
2
3
4 /**
5  * This class conveniently holds constants that correspond to the
6  * system properties that can be define to influence Ubik RMI's runtime
7  * behavior.
8  *
9  * @author Yanick Duchesne
10  * <dl>
11  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
12  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
13  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
14  * </dl>
15  */

16 public interface Consts {
17   
18   /**
19    * This constant corresponds to the property that identifies ubik's JNDI domain.
20    * (the property is <code>ubik.jndi.domain</code>).
21    */

22   public static final String JavaDoc UBIK_DOMAIN_NAME = "ubik.jndi.domain";
23   
24   /**
25    * The default multicast address.
26    */

27   public static final String JavaDoc DEFAULT_MCAST_ADDR = "224.0.0.1";
28
29   /**
30    * The default multicast port.
31    */

32   public static final int DEFAULT_MCAST_PORT = 5454;
33   
34   /**
35    * The default domain.
36    */

37   public static final String JavaDoc DEFAULT_DOMAIN = "default";
38   
39  /**
40   * This constant corresponds to the 'ubik.rmi.address-pattern' property key.
41   * The property should be used to specify a regular expression based upon which the
42   * address of this host is chosen (if this host has more than one network interfaces).
43   *
44   * @see org.sapia.ubik.util.Localhost
45   */

46   public static final String JavaDoc IP_PATTERN_KEY = "ubik.rmi.address-pattern";
47
48   /**
49    * This constant corresponds to the 'ubik.rmi.naming.mcast.post' property key. It
50    * is used to bind a multicast port value in a properties/map instance.
51    */

52   public static final String JavaDoc MCAST_PORT_KEY = "ubik.rmi.naming.mcast.post";
53
54   /**
55    * This constant corresponds to the 'ubik.rmi.naming.mcast.address' property key. It
56    * is used to bind a multicast address value in a properties/map instance.
57    */

58   public static final String JavaDoc MCAST_ADDR_KEY = "ubik.rmi.naming.mcast.address";
59   
60   /**
61    * This constant corresponds to the 'ubik.rmi.naming.mcast.bufsize' property key. It
62    * is used to set the size of buffers that handle UDP datagrams. A too small value
63    * may result in multicast events not being sent/received. Defaults to 5kb.
64    */

65   public static final String JavaDoc MCAST_BUFSIZE_KEY = "ubik.rmi.naming.mcast.bufsize";
66   
67   /**
68    * This constant corresponds to the 'ubik.rmi.naming.mcast.heartbeat.timeout' property key. It
69    * is used to determine the interval (in millis) after which nodes that haven't sent a heartbeat
70    * are considered down (defaults to 30000).
71    */

72   public static final String JavaDoc MCAST_HEARTBEAT_TIMEOUT = "ubik.rmi.naming.mcast.heartbeat.timeout";
73   
74   /**
75    * This constant corresponds to the 'ubik.rmi.naming.mcast.heartbeat.interval' property key. It
76    * is used to determine the interval (in millis) at which nodes send their heartbeat to the other nodes
77    * (defaults to 20000).
78    * <p>
79    * The value of this property should consistent with the value given to the heartbeat timeout: it
80    * should not be more.
81    */

82   public static final String JavaDoc MCAST_HEARTBEAT_INTERVAL = "ubik.rmi.naming.mcast.heartbeat.interval";
83   
84   /**
85    * This constant corresponds to the 'ubik.rmi.marshalling' property key. If the property's
86    * value is true, then the Ubik RMI runtime will wrap remote method invocation
87    * parameters in org.sapia.ubik.rmi.transport.MarshalledObject instances prior sending
88    * the parameters over the wire.
89    */

90   public static final String JavaDoc MARSHALLING = "ubik.rmi.marshalling";
91
92   /**
93    * Defines the logging verbosity; must be one of the following:
94    * debug, info, warning, error - system property name: <code>ubik.rmi.log.level</code>.
95    * Defaults to "error".
96    */

97   public static final String JavaDoc LOG_LEVEL = "ubik.rmi.log.level";
98
99   /**
100    * Specifies if call-back should be used (true) or not (false) - system property name:
101    * <code>ubik.rmi.callback.enabled</code>. Defaults to "false".
102    */

103   public static final String JavaDoc CALLBACK_ENABLED = "ubik.rmi.callback.enabled";
104   
105   /**
106    * Specifies the interval (in millis) at which internal <code>ObjectOutputStream</code> instances
107    * have their <code>reset()</code> method called - see the JDK's javadoc for more information
108    * about that method. System property name: <code>ubik.rmi.connection.reset.interval</code>.
109    * The value defaults to 0 (meaning that the reset occurs every time an object is sent over
110    * the wire).
111    */

112   public static final String JavaDoc CONNECTION_RESET_INTERVAL = "ubik.rmi.connection.reset.interval";
113   
114   /**
115    * Specifies if dynamic code download is allows in this VM (true) or not (false)
116    * - system property name: <code>ubik.rmi.code-download.enabled</code>. Defaults to "false".
117    */

118   public static final String JavaDoc ALLOW_CODE_DOWNLOAD = "ubik.rmi.code-download.enabled";
119
120   /**
121    * Interval (in seconds) at which the server-side distributed garbage collector wakes up -
122    * system property name: <code>ubik.rmi.server.gc.interval</code>. Defaults to 10 secs.
123    */

124   public static final String JavaDoc SERVER_GC_INTERVAL = "ubik.rmi.server.gc.interval";
125
126   /**
127    * Delay after which clients that have not performed a "ping" are considered down -
128    * system property name: <code>ubik.rmi.server.gc.timeout</code>. Defaults to 30 secs.
129    */

130   public static final String JavaDoc SERVER_GC_TIMEOUT = "ubik.rmi.server.gc.timeout";
131
132   /**
133    * Specifies the maximum number of processing server threads - system property name:
134    * <code>ubik.rmi.server.max-threads</code>. No maximum is defined by default.
135    */

136   public static final String JavaDoc SERVER_MAX_THREADS = "ubik.rmi.server.max-threads";
137
138   /**
139    * Specifies the maximum number of threads that process method invocation callbacks
140    * - system property name: code>ubik.rmi.server.callback.max-threads</code>. Defaults to 5.
141    */

142   public static final String JavaDoc SERVER_CALLBACK_MAX_THREADS = "ubik.rmi.server.callback.max-threads";
143
144   /**
145    * Interval (in seconds) at which the client distributed garbage collector wakes up -
146    * system property name: <code>ubik.rmi.client.gc.interval</code>. Defaults to 10 seconds.
147    */

148   public static final String JavaDoc CLIENT_GC_INTERVAL = "ubik.rmi.client.gc.interval";
149
150   /**
151    * Specifies the size of the batch of OIDs that will be sent to remote servers by the client GC.
152    * The latter tracks the OIDs whose corresponding remote reference are null (when means that they
153    * have locally been dereferenced) - system property: <code>ubik.rmi.client.gc.batch.size</code>.
154    */

155   public static final String JavaDoc CLIENT_GC_BATCHSIZE = "ubik.rmi.client.gc.batch.size";
156
157   /**
158    * Specifies the timeout (in millis) of client callbacks (the delay after which the
159    * latter tracks the OIDs whose corresponding remote reference are null (which means
160    * that they have locally been dereferenced). The client GC indirectly interacts with the VM's
161    * GC. All OIDs whose corresponding remote reference has been locally GC'ed are sent to the
162    * originating server (in batches whose size corresponds to the property defined by this constant).
163    */

164   public static final String JavaDoc CLIENT_CALLBACK_TIMEOUT = "ubik.rmi.client.callback.timeout";
165
166   /**
167    * Specifies the "transport type" to use. Property name: <code>ubik.rmi.transport.type</code>
168    *
169    * @see org.sapia.ubik.rmi.server.Hub#exportObject(Object, java.util.Properties)
170    */

171   public static final String JavaDoc TRANSPORT_TYPE = "ubik.rmi.transport.type";
172
173   /**
174    * This constant corresponds to the system property that prefixes the configured
175    * <code>TransportProvider</code>s to plug into the <code>TransportManager</code>.
176    * When it initializes, the latter indeed looks for all system properties starting
177    * with the <code>ubik.rmi.transport.provider</code> prefix. This prefix must be suffixed
178    * with an arbitrary value - so that multiple provider definitions do not overwrite each other.
179    * The property's value is the name of the transport provider's class. For example, given
180    * the <code>org.sapia.ubik.rmi.server.transport.socket.SocketTransportProvider</code> class,
181    * the property could be: <code>ubik.rmi.transport.provider.socket</code>; the associated value
182    * would be the above-mentioned class name.
183    * <p>
184    * At initialization, the <code>TransportManager</code> will dynamically instantiate all
185    * providers that have been thus defined and register them internally.
186    *
187    * @see org.sapia.ubik.rmi.server.transport.TransportProvider#getTransportType()
188    * @see org.sapia.ubik.rmi.server.transport.TransportManager
189    * @see org.sapia.ubik.rmi.server.transport.TransportProvider
190    * @see org.sapia.ubik.rmi.server.transport.socket.SocketTransportProvider
191    */

192   public static final String JavaDoc TRANSPORT_PROVIDER = "ubik.rmi.transport.provider";
193   
194   /**
195    * This constant corresponds to the system property that defines the load factor
196    * of the hashmap used by the <code>ObjectTable</code> to keep remote objects
197    * - system property: <code>ubik.rmi.object-table.load-factor</code>.
198    *
199    */

200   public static final String JavaDoc OBJECT_TABLE_LOAD_FACTOR = "ubik.rmi.object-table.load-factor";
201   
202   /**
203    * This constant corresponds to the system property that defines the initial capacity
204    * of the hashmap used by the <code>ObjectTable</code> to keep remote objects
205    * - system property: <code>ubik.rmi.object-table.initial-capacity</code>.
206    *
207    */

208   public static final String JavaDoc OBJECT_TABLE_INITCAPACITY = "ubik.rmi.object-table.initial-capacity";
209 }
210
Popular Tags