Package net.sf.ehcache.transaction

Examples of net.sf.ehcache.transaction.SoftLock.updateElement()


                                new Object[] {cacheName, key, softLock});
                        continue;
                    }

                    if (softLock.getTransactionID().equals(getCurrentTransactionContext().getTransactionId())) {
                        softLock.updateElement(element);
                        underlyingStore.put(oldElement);
                        getCurrentTransactionContext().updateSoftLock(cacheName, softLock);

                        LOG.debug("put: cache [{}] key [{}] soft locked in current transaction, replaced old value with new one under" +
                                " soft lock", cacheName, key);
View Full Code Here


                                new Object[] {cacheName, key, softLock});
                        continue;
                    }

                    if (softLock.getTransactionID().equals(getCurrentTransactionContext().getTransactionId())) {
                        Element removed = softLock.updateElement(null);
                        underlyingStore.put(oldElement);
                        getCurrentTransactionContext().updateSoftLock(cacheName, softLock);

                        // replaced old value with new one under soft lock, job done.
                        LOG.debug("remove: cache [{}] key [{}] soft locked in current transaction, replaced old value with new one under" +
View Full Code Here

                }

                if (softLock.getTransactionID().equals(getCurrentTransactionContext().getTransactionId())) {
                    Element currentElement = softLock.getElement(getCurrentTransactionContext().getTransactionId());
                    if (currentElement == null) {
                        softLock.updateElement(element);
                        underlyingStore.put(oldElement);
                        getCurrentTransactionContext().updateSoftLock(cacheName, softLock);

                        LOG.debug("putIfAbsent: cache [{}] key [{}] soft locked in current transaction, replaced null with new element" +
                                " under soft lock", cacheName, key);
View Full Code Here

                    }

                    if (softLock.getTransactionID().equals(getCurrentTransactionContext().getTransactionId())) {
                        Element currentElement = softLock.getElement(getCurrentTransactionContext().getTransactionId());
                        if (comparator.equals(element, currentElement)) {
                            Element removed = softLock.updateElement(null);
                            underlyingStore.put(oldElement);
                            getCurrentTransactionContext().updateSoftLock(cacheName, softLock);

                            // replaced old element with null under soft lock, job done.
                            LOG.debug("removeElement: cache [{}] key [{}] soft locked in current transaction, replaced old element" +
View Full Code Here

                    }

                    if (softLock.getTransactionID().equals(getCurrentTransactionContext().getTransactionId())) {
                        Element currentElement = softLock.getElement(getCurrentTransactionContext().getTransactionId());
                        if (comparator.equals(old, currentElement)) {
                            softLock.updateElement(element);
                            underlyingStore.put(oldElement);
                            getCurrentTransactionContext().updateSoftLock(cacheName, softLock);

                            // replaced old element with new one under soft lock, job done.
                            LOG.debug("replace: cache [{}] key [{}] soft locked in current transaction, replaced old element with" +
View Full Code Here

                    }

                    if (softLock.getTransactionID().equals(getCurrentTransactionContext().getTransactionId())) {
                        Element currentElement = softLock.getElement(getCurrentTransactionContext().getTransactionId());
                        if (currentElement != null) {
                            Element replaced = softLock.updateElement(element);
                            underlyingStore.put(oldElement);
                            getCurrentTransactionContext().updateSoftLock(cacheName, softLock);

                            // replaced old element with new one under soft lock, job done.
                            LOG.debug("replace: cache [{}] key [{}] soft locked in current transaction, replaced old element with" +
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.