Processing transactions

Apache Ignite supports atomic and ACID-compliant transactional cache operations. In ACID-compliant mode, you can perform more than one cache operation (same key, different key, different cache) together. Either all of these operations will be committed or none of them will be; there won't be any partial execution of operations. 

Suppose you want to update two values:

   cache.put(2, value1);
cache.put(3, value2);

If the preceding two operations are wrapped inside a transaction and the second update fails, then the first update will be rolled back. 

Ignite supports two modes for cache operations: atomic and transactional. In atomic mode, each cache operation is committed individually. For example, if cache.put(3, value2) fails, the first update, cache.put(2, value1), will still be committed.

Atomic mode performs better than transactional mode because it doesn't need to keep track of the locks and two-phase commits. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.183.210