Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Apache Ignite Quick Start Guide

You're reading from   Apache Ignite Quick Start Guide Distributed data caching and processing made easy

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781789347531
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Sujoy Acharya Sujoy Acharya
Author Profile Icon Sujoy Acharya
Sujoy Acharya
Arrow right icon
View More author details
Toc

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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image