Oracle Coherence - 持久性方案

Oracle Coherence - Scheme for Persistence

在 Oracle Coherence 12 中,可以提供持久存储(非数据库)的 backing-map-scheme 是什么?

例如。 Redis 写入 RDB/AOF 文件并在重启后恢复 KV 条目。

在操作配置中配置持久性环境。

 <persistence-environments>
    <!-- -Dcoherence.distributed.persistence.base.dir=override USR_HOME -->

    <persistence-environment id="stage_env_w_active_store">
            <persistence-mode>active</persistence-mode>
            <active-directory system-property="coherence.distributed.persistence.active.dir">
                    /opt/datastore/staged/active</active-directory>
            <snapshot-directory system-property="coherence.distributed.persistence.snapshot.dir">
                    /opt/datastore/staged/snapshot</snapshot-directory>
            <trash-directory system-property="coherence.distributed.persistence.trash.dir">
                    /opt/datastore/staged/trash</trash-directory>
    </persistence-environment>

    <persistence-environment id="stage_env_w_ondemand_store">
            <persistence-mode>on-demand</persistence-mode>
            <active-directory system-property="coherence.distributed.persistence.active.dir">
                    /opt/datastore/staged/dactive</active-directory>
            <snapshot-directory system-property="coherence.distributed.persistence.snapshot.dir">
                    /opt/datastore/staged/dsnapshot</snapshot-directory>
            <trash-directory system-property="coherence.distributed.persistence.trash.dir">
                    /opt/datastore/staged/dtrash</trash-directory>
    </persistence-environment>

</persistence-environments>

在缓存方案中配置 backing-map-scheme 持久性。

 <distributed-scheme>
      <scheme-name>server</scheme-name>
      <service-name>PartitionedCache</service-name>
      <local-storage system-property="coherence.distributed.localstorage">true</local-storage>
      <backing-map-scheme>
        <local-scheme>
          <high-units>{back-limit-bytes 0B}</high-units>
        </local-scheme>
      </backing-map-scheme>
          <persistence>
         <environment>stage_env_w_active_store</environment>
       </persistence>
      <autostart>true</autostart>
    </distributed-scheme>

"Active Space Used on disk (MB)" 显示在 JMX JVisualVM 中使用的 apt space。