summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-02-04 17:47:49 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-02-04 17:47:49 +0000
commit0171cc8e782f26b1d386ddcce9d750b1f6c76688 (patch)
tree243f82ead47d54c30456a9134ad3025b618eddd2 /sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main
parentac1a082265c1b37e64b5264cb66471dca549a47e (diff)
Set default map config to use near cache to improve local endpoint read performance
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@906581 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java b/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java
index afdee1484f..40a7a6de65 100644
--- a/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java
+++ b/sca-java-2.x/trunk/modules/endpoint-hazelcast/src/main/java/org/apache/tuscany/sca/endpoint/hazelcast/HazelcastEndpointRegistry.java
@@ -35,6 +35,8 @@ import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.TuscanyURI;
import com.hazelcast.config.Config;
+import com.hazelcast.config.MapConfig;
+import com.hazelcast.config.NearCacheConfig;
import com.hazelcast.config.TcpIpConfig;
import com.hazelcast.config.XmlConfigBuilder;
import com.hazelcast.core.EntryEvent;
@@ -128,7 +130,9 @@ public class HazelcastEndpointRegistry extends BaseEndpointRegistry implements E
}
}
}
-
+
+ config.getMapConfig("default").setNearCacheConfig(new NearCacheConfig(0, 0, "NONE", 0, true));
+
this.hazelcastInstance = Hazelcast.newHazelcastInstance(config);
}