Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
15.5. Using Eviction
15.5.1. Initialize Eviction Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
To initialize eviction, set the eviction element's
max-entries attributes value to a number greater than zero. Adjust the value set for max-entries to discover the optimal value for your configuration. It is important to remember that if too large a value is set for max-entries, JBoss Data Grid runs out of memory.
The following procedure outlines the steps to initialize eviction in JBoss Data Grid:
Procedure 15.1. Initialize Eviction
Add the Eviction Tag
Add the <eviction> tag to your project's <cache> tags as follows:<eviction />
<eviction />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Eviction Strategy
Set thestrategyvalue to set the eviction strategy employed. Possible values areLRU,UNORDEREDandLIRS(orNONEif no eviction is required). The following is an example of this step:<eviction strategy="LRU" />
<eviction strategy="LRU" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Maximum Entries
Set the maximum number of entries allowed in memory. The default value is-1for unlimited entries.- In Library mode, set the
maxEntriesparameter as follows:<eviction strategy="LRU" maxEntries="200" />
<eviction strategy="LRU" maxEntries="200" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In Remote Client Server mode, set the
max-entriesas follows:<eviction strategy="LRU" max-entries="200" />
<eviction strategy="LRU" max-entries="200" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Result
Eviction is configured for the target cache.