org.springframework.data.gemfire.client
Class Interest<K>

java.lang.Object
  extended by org.springframework.data.gemfire.client.Interest<K>
All Implemented Interfaces:
InitializingBean
Direct Known Subclasses:
RegexInterest

public class Interest<K>
extends Object
implements InitializingBean

Basic holder class for registering an interest. Useful for configuring Gemfire caches through XML and or JavaBeans means.

Author:
Costin Leau

Constructor Summary
Interest()
           
Interest(K key)
           
Interest(K key, InterestResultPolicy policy)
           
Interest(K key, InterestResultPolicy policy, boolean durable)
           
Interest(K key, String policy)
           
Interest(K key, String policy, boolean durable)
           
 
Method Summary
 void afterPropertiesSet()
           
protected  K getKey()
          Returns the key of interest.
protected  InterestResultPolicy getPolicy()
          Returns the interest policy.
protected  boolean isDurable()
          Returns the interest durability.
 void setDurable(boolean durable)
          Sets the interest durability.
 void setKey(K key)
          Sets the key of interest.
 void setPolicy(Object policy)
          Sets the interest policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interest

public Interest()

Interest

public Interest(K key)

Interest

public Interest(K key,
                InterestResultPolicy policy)

Interest

public Interest(K key,
                String policy)

Interest

public Interest(K key,
                String policy,
                boolean durable)

Interest

public Interest(K key,
                InterestResultPolicy policy,
                boolean durable)
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

getKey

protected K getKey()
Returns the key of interest.

Returns:
the key

setKey

public void setKey(K key)
Sets the key of interest.

Parameters:
key - the key to set

getPolicy

protected InterestResultPolicy getPolicy()
Returns the interest policy.

Returns:
the policy

setPolicy

public void setPolicy(Object policy)
Sets the interest policy. The argument is set as an Object to be able to accept both InterestResultType instances but also Strings (for XML configurations).

Parameters:
policy - the policy to set

isDurable

protected boolean isDurable()
Returns the interest durability.

Returns:
the durable

setDurable

public void setDurable(boolean durable)
Sets the interest durability.

Parameters:
durable - the durable to set


Copyright © 2010-2011 SpringSource, a division of VMware. All Rights Reserved.