Not sure I understood. How many machines do you have?
If you have many and want them all to replicate to a single other node, how are you going to solve conflicts on the same keys?
If that doesn't matter, you could configure all caches to be "LOCAL" as cluster mode, and configure a Remote CacheLoader which writes to the single node.
As I understand you, you want some kind of asymmetric cluster where each key only replicates to nodes/JVMs that reside on the same physical machine. Asymmetric clusters are not supported (yet).
Maybe you can use a unique clusterName for all JVMs that should back this special cache up and reside on the same machine (e.g. ip address as clusterName). Maybe you can use FILE_PING for node discovery. To access the cache from other physical machines you can use a client API.
Another approach might be implementing a custom ConsistentHash that replicates to all addresses that contain some special topology information.
I have ony 1 machine with several JVM's. No ohther pyhsical machine should involved in the replication process.
yes, it would be a possible solution to use a unique cache name for the JVM's on the 1 machine. It is NOT necessary that the cache is accesible by other machines.
I thought it would be useful to "configure" this kind of requirement to save resources... (my assumption was that it is much more effective when the replication mechanism is aware that replication is only needed for 1 machine).
But it seems this kind of requirement is not invented, right??
Just out of curiosity, why do you want to replicate on the same machine?
The main part of the app uses a old 32 bit windows dll (calculation engine). So I have to use a 32 bit java vm. To make use of the machines resources (RAM) the plan is to run several instances of the same app. With this approach it is also possible to turn of instances of the app for maintenance (a load balancer handles the usage of the app instances)
ah, now I understand.
You don't have to do much special, you can start any number of instances on the same machine, just make sure that JGroups is configured to use the localhost/loopback network interface so you avoid sending packets out to the real network.
These JVM properties should do the trick if you have a fairly standard JGroups configuration (but it depends from the configuration), so if you didn't change it much you could try them first:
now just start some instances, they should form a cluster and you're all set.
thanks, this is exactly what I want. Now replication occurs only on 1 machine.