Package org.jboss.cache.config

Examples of org.jboss.cache.config.Option


    }
   
    public static Node addNode(Cache cache, Fqn fqn, boolean localOnly, boolean resident, DataVersion version)
            throws CacheException {
        try {
            Option option = null;
            if (localOnly || version != null) {
                option = new Option();
                option.setCacheModeLocal(localOnly);
                option.setDataVersion(version);
            }
           
            Node root = cache.getRoot();
            setInvocationOption(cache, option);
            // FIXME hack to work around fact that calling
View Full Code Here


     *            the cache to set the Option on. Cannot be <code>null</code>.
     * @param version
     *            the DataVersion to set. Cannot be <code>null</code>.
     */
    public static void setDataVersionOption(Cache cache, DataVersion version) {
        Option option = new Option();
        option.setDataVersion(version);
        setInvocationOption(cache, option);
    }
View Full Code Here

   private void removeFromTreeCache(Fqn<?> fqn, boolean localOnly) throws Exception
   {
      if (localOnly)
      {
         InvocationContext ctx = cache.getInvocationContext();
         Option option = new Option();
         option.setCacheModeLocal(true);
         ctx.setOptionOverrides(option);
      }
      cache.removeNode(fqn);
   }
View Full Code Here

      return true;
   }
  
   private Option getOptionOverrides()
   {
      Option option = this.plainCache_.getInvocationContext().getOptionOverrides();
      option.setForceSynchronous(this.forceSynchronous);
      return option;
   }
View Full Code Here

      if (state.isEmpty())
      {
         if (configuredToFetchState())
            log.info("Data owner has no state to set, even though buddy is configured to accept state.  Assuming there is no data on the data owner.");
         // create the backup region anyway
         Option o = cache.getInvocationContext().getOptionOverrides();
         o.setSkipCacheStatusCheck(true);
         o = cache.getInvocationContext().getOptionOverrides();
         o.setCacheModeLocal(true);
         o.setSkipCacheStatusCheck(true);
         cache.put(Fqn.fromElements(BUDDY_BACKUP_SUBTREE, newGroup.getGroupName()), (Map) Collections.emptyMap());
      }
      else
      {
         for (Map.Entry<Fqn, byte[]> entry : state.entrySet())
View Full Code Here

      if (fqn.isRoot())
      {
         boolean result = true;
         // we need to preserve options
         InvocationContext ctx = getInvocationContext();
         Option o = ctx.getOptionOverrides();
         Set<Fqn> internalFqns = getInternalFqns();
         for (Object childName : peek(fqn, false, false).getChildrenNames())
         {
            if (!internalFqns.contains(Fqn.fromElements(childName)))
            {
View Full Code Here

   private void removeFromTreeCache(Fqn<?> fqn, boolean localOnly) throws Exception
   {
      if (localOnly)
      {
         InvocationContext ctx = cache.getInvocationContext();
         Option option = new Option();
         option.setCacheModeLocal(true);
         ctx.setOptionOverrides(option);
      }
      cache.removeNode(fqn);
   }
View Full Code Here

        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

    @Override
    public void evict(Object key) throws CacheException {
        putValidator.keyRemoved(key);
        region.ensureRegionRootExists();

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

       putValidator.regionRemoved();
      
       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

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.