Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
16.5. Configure Expiration
In JBoss Data Grid, expiration is configured in a manner similar to eviction.
Procedure 16.1. Configure Expiration
Add the Expiration Tag
Add the <expiration> tag to your project's <cache> tags as follows:<expiration />
<expiration />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Expiration Lifespan
Set thelifespanvalue to set the period of time (in milliseconds) an entry can remain in memory. The following is an example of this step:<expiration lifespan="1000" />
<expiration lifespan="1000" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Maximum Idle Time
Set the time that entries are allowed to remain idle (unused) after which they are removed (in milliseconds). The default value is-1for unlimited time.- In Library mode, set the
maxIdleparameter as follows:<expiration lifespan="1000" maxIdle="1000" />
<expiration lifespan="1000" maxIdle="1000" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In Remote Client Server mode, set the
max-idleas follows:<expiration lifespan="1000" max-idle="1000" />
<expiration lifespan="1000" max-idle="1000" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Result
Expiration is now configured for the cache implementation.