~ubuntu-branches/ubuntu/trusty/ehcache/trusty

« back to all changes in this revision

Viewing changes to ehcache.xml

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2008-07-14 02:08:53 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080714020853-37uz6uzh6mc5mcgx
Tags: 1.5.0-1
* New upstream release
* Add libjgroups-java to Build-Depends-Indep
* Bump Standards-Version to 3.8.0
* debian/copyright: remove the full text of Apache 2.0 license, as now
  is included in common licenses

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ehcache.xsd">
 
1
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
2
         xsi:noNamespaceSchemaLocation="ehcache.xsd">
2
3
 
3
4
    <!--
4
5
    CacheManager Configuration
7
8
    
8
9
    See instructions below or the ehcache schema (ehcache.xsd) on how to configure.
9
10
 
 
11
    System property tokens can be specified in this file which are replaced when the configuration is loaded.
 
12
    For example multicastGroupPort=${multicastGroupPort} can be replaced with the System property either
 
13
    from an environment variable or a system property specified with a command line switch such as
 
14
     -DmulticastGroupPort=4446.
 
15
 
10
16
    DiskStore configuration
11
17
    =======================
12
18
 
13
 
    Sets the path to the directory where cache files are created.
14
 
 
15
 
    If the path is a Java System Property it is replaced by its value in the
16
 
    running VM.
 
19
    The diskStore element is optional. To turn off disk store path creation, comment out the diskStore
 
20
    element below.
 
21
 
 
22
    Configure it if you have overflowToDisk or diskPersistent enabled for any cache.
 
23
 
 
24
    If it is not configured, and a cache is created which requires a disk store, a warning will be
 
25
     issued and java.io.tmpdir will automatically be used.
 
26
 
 
27
    diskStore has only one attribute - "path". It is the path to the directory where
 
28
    .data and .index files will be created.
 
29
 
 
30
    If the path is one of the following Java System Property it is replaced by its value in the
 
31
    running VM. For backward compatibility these are not specified without being enclosed in the ${token}
 
32
    replacement syntax.
17
33
 
18
34
    The following properties are translated:
19
35
    * user.home - User's home directory
20
36
    * user.dir - User's current working directory
21
37
    * java.io.tmpdir - Default temp file path
 
38
    * ehcache.disk.store.dir - A system property you would normally specify on the command line
 
39
      e.g. java -Dehcache.disk.store.dir=/u01/myapp/diskdir ...
22
40
 
23
41
    Subdirectories can be specified below the property e.g. java.io.tmpdir/one
24
42
    -->
107
125
 
108
126
    The hostname is the hostname of the remote CacheManager peer. The port is the listening
109
127
    port of the RMICacheManagerPeerListener of the remote CacheManager peer.
 
128
    
 
129
    Configuring JGroups replication:
 
130
    <cacheManagerPeerProviderFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheManagerPeerProviderFactory"
 
131
                                     properties="connect=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;
 
132
                                     mcast_send_buf_size=150000;mcast_recv_buf_size=80000):
 
133
                                     PING(timeout=2000;num_initial_members=6):
 
134
                                     MERGE2(min_interval=5000;max_interval=10000):
 
135
                                     FD_SOCK:VERIFY_SUSPECT(timeout=1500):
 
136
                                     pbcast.NAKACK(gc_lag=10;retransmit_timeout=3000):
 
137
                                     UNICAST(timeout=5000):
 
138
                                     pbcast.STABLE(desired_avg_gossip=20000):
 
139
                                     FRAG:
 
140
                                     pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=false)"
 
141
                                     propertySeparator="::"
 
142
            />
 
143
     The only property necessay is the connect String used by jgroups to configure itself. Refer to the Jgroups documentation for explanation
 
144
     of all the protocols. The example above uses UDP multicast. If the connect property is not specified the default JGroups connection will be
 
145
     used.       
110
146
 
111
147
    -->
112
148
    <cacheManagerPeerProviderFactory
147
183
      where the host is multihomed and you want to control the interface over which cluster
148
184
      messages are received. Defaults to the host name of the default interface if not
149
185
      specified.
150
 
    * port - the port the listener listens on. This defaults to a free port if not specified.
 
186
    * port - the port the RMI Registry listener listens on. This defaults to a free port if not specified.
 
187
    * remoteObjectPort - the port number on which the remote objects bound in the registry receive calls.
 
188
                         This defaults to a free port if not specified.
151
189
    * socketTimeoutMillis - the number of ms client sockets will stay open when sending
152
190
      messages to the listener. This should be long enough for the slowest message.
153
191
      If not specified it defaults 120000ms.
273
311
      is 10. This property is only applicable if replicateAsynchronously=true
274
312
 
275
313
 
 
314
        For the Jgroups replication this is done with:
 
315
        <cacheEventListenerFactory class="net.sf.ehcache.distribution.jgroups.JGroupsCacheReplicatorFactory"
 
316
                            properties="replicateAsynchronously=true, replicatePuts=true,
 
317
                                                        replicateUpdates=true, replicateUpdatesViaCopy=false,
 
318
                                                        replicateRemovals=true,asynchronousReplicationIntervalMillis=1000"/>
 
319
    This listener supports the same property than the RMICacheReplicationFactory. 
 
320
 
276
321
    Cluster Bootstrapping
277
322
 
278
323
    The RMIBootstrapCacheLoader bootstraps caches in clusters where RMICacheReplicators are