0

Terracotta サーバーが使用できない場合、Terracotta サーバー構成から diskStore にスワップするようにアプリを構成する必要があります。これを行う方法はありますか?ehcache.xml で terracottaConfig 要素を構成すると、Terracotta サーバーに到達できない場合、アプリケーションを起動できません.. これは私の ehcache.xml 構成です:

    <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="ehcache.xsd" name="gpCacheManager">

    <diskStore path="java.io.tmpdir" />

    <terracottaConfig rejoin="true">
        <tc-config>
            <servers>
                <server host="XXX.XXX.XXX.XX" name="host1">
                </server>
            </servers>
            <clients>
                <logs>app/logs-%i</logs>
            </clients>
            <nonstop immediateTimeout="true" timeoutMillis="3000">
                <timeoutBehavior type="localReads" />
            </nonstop>
        </tc-config>
    </terracottaConfig>

    <defaultCache maxElementsInMemory="10000" eternal="false"
        timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="false"
        diskPersistent="false" diskExpiryThreadIntervalSeconds="120"
        memoryStoreEvictionPolicy="LRU">
        <terracotta clustered="true">
            <nonstop immediateTimeout="false" timeoutMillis="3000">
                <timeoutBehavior type="localReads" />
            </nonstop>
        </terracotta>
    </defaultCache>

    <cache name="oxmCache" maxElementsInMemory="10000" eternal="false"
        timeToIdleSeconds="240" timeToLiveSeconds="240" overflowToDisk="false"
        diskPersistent="false" diskExpiryThreadIntervalSeconds="240"
        memoryStoreEvictionPolicy="LRU">
        <terracotta clustered="true">
            <nonstop immediateTimeout="false" timeoutMillis="3000">
                <timeoutBehavior type="localReads" />
            </nonstop>
        </terracotta>
    </cache>

</ehcache>

ありがとうございました!

4

1 に答える 1

0

残念ながら、(クライアント上で) ディスクを使用する機能は、現在サポートされていません。基本的に、私が正しければ、テラコッタ サーバーが利用できない場合に、エントリをテラコッタ サーバーではなくディスクにスピルさせたいと考えています。

さて、サーバーが戻ってきたときにも調整が必要になると思いますよね? ディスク上に (部分的な) データを保持することがどのように役立つかを理解するのに苦労しているからです...詳しく説明しますか?

于 2011-11-09T20:29:25.537 に答える