Distributed Locks

Cacheonix provides an API for distributed mutual exclusions that allows distributed Java applications to maintain strict consistency by serializing access to shared data. Multiple servers that modify shared resources concurrently may cause interference and data inconsistency. Distributed locks by Cacheonix provide safety of data access, application liveness and simplicity of programming:

        ReadWriteLock readWriteLock = cacheonix.getCluster().getReadWriteLock();

        Lock writeLock = readWriteLock.readLock();

        writeLock.lock();

        try {

           // Critical section protected by the write lock

           ...

        } finally {

           writeLock.unlock();

        }

Next: