Add option to use Hazelcast as datastore for development environment.
This patch will set the default backend as Hazelcast.
To use RAMCloud as backend data store, add -Dnet.onrc.onos.datastore.backend=ramcloud to java option.
- ClientMode: Use existing Hazelcast Instance if it exist.
- map name starting with datastore:// is now configured to be strong consistent
- add main for manual testing
- follow PMD,etc. where easily possible
- make HZClient Singleton
Change-Id: Ibe2afc3bfddfd7fd567c91477c16cd679fc543d4
diff --git a/conf/hazelcast.xml b/conf/hazelcast.xml
index 84c7354..cf44fc3 100644
--- a/conf/hazelcast.xml
+++ b/conf/hazelcast.xml
@@ -3,6 +3,16 @@
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <!-- Configuration of maps used as a data store. -->
+ <map name="datastore://*">
+ <!-- must use 'sync' backup to imitate other data store -->
+ <backup-count>3</backup-count>
+ <async-backup-count>0</async-backup-count>
+ <!-- must be false for strong consistency -->
+ <read-backup-data>false</read-backup-data>
+ <!-- near cache must not be used -->
+ </map>
+
<map name="*">
<!--