SharedLog runtime proto

ONOS-1806, ONOS-1807, ONOS-1808

Change-Id: Ic86cb7bdc6b04a81180ab43afa01c1aea4ac18c7
diff --git a/conf/template/hazelcast.xml.template b/conf/template/hazelcast.xml.template
index 6e511ef..d06addc 100644
--- a/conf/template/hazelcast.xml.template
+++ b/conf/template/hazelcast.xml.template
@@ -32,6 +32,9 @@
         <data-serializable-factories>
             <data-serializable-factory factory-id="1">net.onrc.onos.core.datastore.hazelcast.VersionedValueSerializableFactory</data-serializable-factory>
         </data-serializable-factories>
+        <serializers>
+          <serializer type-class="net.onrc.onos.core.util.distributed.sharedlog.internal.LogValue">net.onrc.onos.core.util.distributed.sharedlog.hazelcast.LogValueSerializer</serializer>
+        </serializers>
     </serialization>
 
   <!-- Configuration of maps used as a data store. -->
@@ -44,6 +47,38 @@
     <!-- near cache must not be used -->
   </map>
 
+  <!-- Configuration of maps used as a log store. -->
+  <map name="logmap://*">
+    <!-- must use 'sync' backup to imitate other data store -->
+    <backup-count>3</backup-count>
+    <async-backup-count>0</async-backup-count>
+    <!-- can be true, since log map value is basically immutable -->
+    <read-backup-data>true</read-backup-data>
+    <!-- near cache can be enabled -->
+    <near-cache>
+      <!-- TODO revisit random params -->
+      <max-size>5000</max-size>
+      <time-to-live-seconds>300</time-to-live-seconds>
+      <eviction-policy>LRU</eviction-policy>
+    </near-cache>
+  </map>
+
+  <!-- Configuration of maps used as a snap shot store. -->
+  <map name="ssmap://*">
+    <!-- must use 'sync' backup to imitate other data store -->
+    <backup-count>3</backup-count>
+    <async-backup-count>0</async-backup-count>
+    <!-- can be true, since snap shot map value is basically immutable -->
+    <read-backup-data>true</read-backup-data>
+    <!-- near cache can be enabled -->
+    <near-cache>
+      <!-- TODO revisit random params -->
+      <max-size>10</max-size>
+      <time-to-live-seconds>300</time-to-live-seconds>
+      <eviction-policy>LRU</eviction-policy>
+    </near-cache>
+  </map>
+
   <map name="*">
 
     <!--