此内容没有您所选择的语言版本。
13.6. Mortal and Immortal Data
13.6.1. About Data Mortality 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
In addition to storing entities, JBoss Data Grid allows you to attach mortality information to data. For example, using the standard
put(key, value) creates an entry that will never expire, called an immortal entry. Alternatively, an entry created using put(key, value, lifespan, timeunit) is a mortal entry that has a specified fixed life span, after which it expires.
In addition to the
lifespan parameter, JBoss Data Grid also provides a maxIdle parameter used to determine expiration. The maxIdle and lifespan parameters can be used in various combinations to set the life span of an entry.