I'm using Apache Ignite with Spring Data. I need a column "username" to be unique. In fact "username" is the key of the Ignite cache. I think ignite doesn't implement unique constraint yet. Using plain ignite API, I'm not sure if I can do a lock like:
IgniteCache<String, Integer> cache = ignite.cache("userCache");
Lock lock = cache.lock("username1");
lock.lock();
//check if doesn't exist yet
...
as "username1" doesn't exist yet. Is there other approach?