All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.security.actions.SetCacheAvailabilityAction Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.security.actions;

import org.infinispan.AdvancedCache;
import org.infinispan.partitionhandling.AvailabilityMode;

/**
 * SetCacheAvailabilityAction.
 *
 * @author Dan Berindei
 * @since 7.0
 */
public class SetCacheAvailabilityAction extends AbstractAdvancedCacheAction {

   private AvailabilityMode availabilityMode;

   public SetCacheAvailabilityAction(AdvancedCache cache, AvailabilityMode availabilityMode) {
      super(cache);
      this.availabilityMode = availabilityMode;
   }

   @Override
   public Void run() {
      cache.setAvailability(availabilityMode);
      return null;
   }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy