-
Language:
English
-
Language:
English
5.8. GET and PUT Usage in Distribution Mode
5.8.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.