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

org.infinispan.commands.LocalFlagAffectedCommand Maven / Gradle / Ivy

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

import org.infinispan.context.Flag;

import java.util.Set;

/**
 * Commands affected by Flags will be checked locally to control certain behaviors such whether or not to invoke
 * certain commands remotely, check cache store etc.
 *
 * @author William Burns
 * @since 6.0
 */
public interface LocalFlagAffectedCommand {
   /**
    * @return the Flags which where set in the context - only valid to invoke after {@link #setFlags(java.util.Set)}
    */
   Set getFlags();

   /**
    * Use it to store the flags from the InvocationContext into the Command before remoting the Command.
    * @param flags
    */
   void setFlags(Set flags);

   /**
    * Use it to store the flags from the InvocationContext into the Command before remoting the Command.
    * @param flags
    */
   void setFlags(Flag... flags);

   /**
    * Check whether a particular flag is present in the command
    *
    * @param flag to lookup in the command
    * @return true if the flag is present
    */
   boolean hasFlag(Flag flag);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy