Package org.jboss.cache.config

Examples of org.jboss.cache.config.Option


        if (!region.checkValid())
            return false;
      
        region.ensureRegionRootExists();
        if (invalidation) {
          Option opt = new Option();
          opt.setCacheModeLocal(true);
          CacheHelper.put(cache, regionFqn, key, value, opt);
        }
        else {
          CacheHelper.put(cache, regionFqn, key, value);
        }
View Full Code Here


      if (!putValidator.invalidateKey(key)) {
        throw new CacheException("Failed to invalidate pending putFromLoad calls for key " + key + " from region " + region.getName());
      }
        region.ensureRegionRootExists();

        Option opt = NonLockingDataVersion.getInvocationOption();
        CacheHelper.remove(cache, regionFqn, key, opt);
    }
View Full Code Here

        }       
      
       Transaction tx = region.suspend();
       try {       
          region.ensureRegionRootExists();
          Option opt = NonLockingDataVersion.getInvocationOption();
          CacheHelper.sendEvictAllNotification(cache, regionFqn, region.getMemberId(), opt);
       }
       finally {
          region.resume(tx);
       }
View Full Code Here

        if (!region.checkValid())
            return false;
       
        region.ensureRegionRootExists();

        Option opt = getDataVersionOption(version, null);
        if (this.invalidation) {
          opt.setCacheModeLocal(true);
        }
        CacheHelper.put(cache, regionFqn, key, value, opt);
        return true;
    }
View Full Code Here

          region.ensureRegionRootExists();
 
          // We ignore minimalPutOverride. JBossCache putForExternalRead is
          // already about as minimal as we can get; it will promptly return
          // if it discovers that the node we want to write to already exists
          Option opt = getDataVersionOption(version, version);
          return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt);
        }
        finally {
          putValidator.releasePutFromLoadLock(key);
        }
View Full Code Here

           return false;
       
        try {
          region.ensureRegionRootExists();
 
          Option opt = getDataVersionOption(version, version);
          return CacheHelper.putForExternalRead(cache, regionFqn, key, value, opt);
        }
        finally {
          putValidator.releasePutFromLoadLock(key);
        }
View Full Code Here

        // may have already restored the region so they need to
        // be informed of the change.
       
        region.ensureRegionRootExists();

        Option opt = NonLockingDataVersion.getInvocationOption();
        CacheHelper.remove(cache, regionFqn, key, opt);
    }
View Full Code Here

    @Override
    public void removeAll() throws CacheException {
       if (!putValidator.invalidateRegion()) {
         throw new CacheException("Failed to invalidate pending putFromLoad calls for region " + region.getName());
       }
       Option opt = NonLockingDataVersion.getInvocationOption();
       CacheHelper.removeAll(cache, regionFqn, opt);
    }
View Full Code Here

        // may have already restored the region so they need to
        // be informed of the change.
       
        region.ensureRegionRootExists();

        Option opt = getDataVersionOption(currentVersion, previousVersion);
        CacheHelper.put(cache, regionFqn, key, value, opt);
        return true;
    }
View Full Code Here

    private Option getDataVersionOption(Object currentVersion, Object previousVersion) {
       
       org.jboss.cache.optimistic.DataVersion dv = (dataDescription != null && dataDescription.isVersioned()) ? new DataVersionAdapter(
                currentVersion, previousVersion, dataDescription.getVersionComparator(), dataDescription.toString())
                : NonLockingDataVersion.INSTANCE;
        Option opt = new Option();
        opt.setDataVersion(dv);
        return opt;
    }
View Full Code Here

TOP

Related Classes of org.jboss.cache.config.Option

Copyright © 2018 www.massapicom. 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.