Created
July 6, 2012 11:19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<global> | |
.... | |
<!-- sites are being defined globally. There can be only one local site --> | |
<sites localSite="${site:LON}"> | |
<site name="LON"/> | |
<site name="SFO"/> | |
<site name="NYC"/> | |
</sites> | |
.... | |
</global> | |
<default> | |
.... | |
<!-- Each cache can configure the sites on which it replicates its state to, | |
the name of the corresponding cache from the remote site and whether the replication is sync or not. | |
In future more attibutes will be added here, such as fetchStateOnStartup etc. As this is defined in | |
the default cache will be inherited in named caches. | |
--> | |
<sites> | |
<!-- it is possible to specify the name of the remote backup cache. If not specified it defaults | |
to the same cache name. In this case in the named caches you must make sure that you don't use | |
the same cache name in order to avoid different caches backing up to the same remote cache. --> | |
<backup name="SFO" cacheName="LONBackup" strategy="sync"/> | |
<backup name="NYC" strategy="async"/> | |
</sites> | |
.... | |
</default> | |
<namedCache name="other"> | |
<sites> | |
<!-- this cache only back ups to SFO. It also overrides the strategy. As the cacheName is not | |
defined, it would default to this cache's name, i.e. 'other' --> | |
<backup name="SFO" strategy="async"/> | |
</sites> | |
</namedCache> | |
<namedCache name="wrong"> | |
<sites> | |
<!-- this should throw an configuration exception as the backup cache name is the same as the one | |
defined in the default cache --> | |
<backup name="SFO" strategy="async" cacheName="LONBackup"/> | |
</sites> | |
</namedCache> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment