Examples of LiveCacheStatisticsWrapper


Examples of net.sf.ehcache.statistics.LiveCacheStatisticsWrapper

     * @param xid a XID
     * @param onePhase true if onePhase, false otherwise
     * @throws XAException when an error occurs
     */
    public void commitInternal(Xid xid, boolean onePhase) throws XAException {
        LiveCacheStatisticsWrapper liveCacheStatisticsWrapper = (LiveCacheStatisticsWrapper) cache.getLiveCacheStatistics();
        liveCacheStatisticsWrapper.xaCommit();
        if (onePhase) {
            XATransactionContext twopcTransactionContext = xidToContextMap.get(xid);
            if (twopcTransactionContext == null) {
                throw new EhcacheXAException("cannot call commit(onePhase=true) after prepare", XAException.XAER_PROTO);
            }
View Full Code Here

Examples of net.sf.ehcache.statistics.LiveCacheStatisticsWrapper

     * The rollback implementation
     * @param xid a XID
     * @throws XAException when an error occurs
     */
    public void rollbackInternal(Xid xid) throws XAException {
        LiveCacheStatisticsWrapper liveCacheStatisticsWrapper = (LiveCacheStatisticsWrapper) cache.getLiveCacheStatistics();
        liveCacheStatisticsWrapper.xaRollback();
        XidTransactionID xidTransactionID = transactionIDFactory.createXidTransactionID(xid);
        Set<SoftLock> softLocks = softLockFactory.collectAllSoftLocksForTransactionID(xidTransactionID);
        for (SoftLock softLock : softLocks) {
            if (softLock.isExpired()) {
                softLock.lock();
View Full Code Here

Examples of net.sf.ehcache.statistics.LiveCacheStatisticsWrapper

        registeredCacheExtensions = new CopyOnWriteArrayList<CacheExtension>();
        registeredCacheLoaders = new CopyOnWriteArrayList<CacheLoader>();

        //initialize statistics
        liveCacheStatisticsData = new LiveCacheStatisticsWrapper(this);
        sampledCacheStatistics = new SampledCacheStatisticsWrapper();

        RegisteredEventListeners listeners = getCacheEventNotificationService();
        registerCacheListeners(configuration, listeners);
        registerCacheExtensions(configuration, this);
View Full Code Here

Examples of net.sf.ehcache.statistics.LiveCacheStatisticsWrapper

        if (compoundStore != null) {
            throw new CloneNotSupportedException("Cannot clone an initialized cache.");
        }
        Cache copy = (Cache) super.clone();
        // create new copies of the statistics
        copy.liveCacheStatisticsData = new LiveCacheStatisticsWrapper(copy);
        copy.sampledCacheStatistics = new SampledCacheStatisticsWrapper();

        copy.configuration = configuration.clone();
        copy.guid = createGuid();
        copy.cacheStatus = new CacheStatus();
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.