此内容没有您所选择的语言版本。
5.7. GET and PUT Usage in Distribution Mode
5.7.1. About GET and PUT Operations in Distribution Mode 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
In distribution mode, the cache performs a remote
GET
command before a write command. This occurs because certain methods (for example, Cache.put()
) return the previous value associated with the specified key according to the java.util.Map
contract. When this is performed on an instance that does not own the key and the entry is not found in the L1 cache, the only reliable way to elicit this return value is to perform a remote GET
before the PUT
.
The
GET
operation that occurs before the PUT
operation is always synchronous, whether the cache is synchronous or asynchronous, because JBoss Data Grid must wait for the return value.