2.3.3. Configure Per-Invocation Flags
To use per-invocation flags in JBoss Data Grid, add the required flags to the advanced cache via the
withFlags()
method call. For example:
Cache cache = ... cache.getAdvancedCache() .withFlags(Flag.SKIP_CACHE_STORE, Flag.CACHE_MODE_LOCAL) .put("local", "only");
Note
The called flags only remain active for the duration of the cache operation. To use the same flags in multiple invocations within the same transaction, use the
withFlags()
method for each invocation. If the cache operation must be replicated onto another node, the flags are also carried over to the remote nodes.