VMware GemFire Java API Reference
Interface Declarable
-
- All Known Subinterfaces:
AccessControl,AsyncEventListener,Authenticator,AuthInitialize,CacheCallback,CacheListener<K,V>,CacheLoader<K,V>,CacheWriter<K,V>,CqListener,CqStatusListener,CustomExpiry<K,V>,FixedPartitionResolver<K,V>,GatewayEventFilter,GatewayEventSubstitutionFilter<K,V>,GatewayTransportFilter,InterestRegistrationListener,LuceneSerializer<T>,PartitionResolver<K,V>,RegionMembershipListener<K,V>,RegionRoleListener<K,V>,ServerLoadProbe,TransactionListener,TransactionWriter
- All Known Implementing Classes:
org.apache.geode.connectors.jdbc.internal.AbstractJdbcCallback,AutoBalancer,CacheListenerAdapter,CacheWriterAdapter,CqListenerAdapter,CreateRegionFunction,DebugCacheListener,FlatFormatSerializer,GatewayDeltaEventApplicationCacheListener,GatewayDeltaForwarderCacheListener,JdbcAsyncWriter,JdbcLoader,JdbcWriter,LocalSessionCacheLoader,LocalSessionCacheWriter,ReflectionBasedAutoSerializer,RegionConfigurationCacheListener,RegionMembershipListenerAdapter,RegionRoleListenerAdapter,RegionSizeFunction,ServerLoadProbeAdapter,SessionCustomExpiry,SessionExpirationCacheListener,SniProxySocketFactory,StringPrefixPartitionResolver,TouchPartitionedRegionEntriesFunction,TouchReplicatedRegionEntriesFunction,TransactionListenerAdapter
public interface DeclarableAn object that can be described in a declarative caching XML file.Any user-defined object in the declarative caching xml file should implement this interface in order to be constructed.
For example, the user can declare a
CacheLoaderin a declarative XML file as follows:<cache-loader> <class-name>com.company.app.DBLoader</class-name> <parameter name="URL"> <string>jdbc://12.34.56.78/mydb</string> </parameter> </cache-loader>In this case,
com.company.app.DBLoadermust implement both theCacheLoaderandDeclarableinterfaces. The cache service will construct acom.company.app.DBLoaderobject by invoking the loader's zero-argument constructor and then calling theinit(java.util.Properties)method to pass in the parameters.See package introduction.
- Since:
- GemFire 2.0
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidinit(java.util.Properties props)Deprecated.as of Geode 1.5 implement initialize instead.default voidinitialize(Cache cache, java.util.Properties properties)Initializes a user-defined object, owned by the given cache, using the given properties.
-
-
-
Method Detail
-
init
@Deprecated default void init(java.util.Properties props)
Deprecated.as of Geode 1.5 implement initialize instead.Initializes a user-defined object using the given properties. Note that any uncaught exception thrown by this method will cause theCacheinitialization to fail.- Parameters:
props- Contains the parameters declared in the declarative xml file.- Throws:
java.lang.IllegalArgumentException- If one of the configuration options inpropsis illegal or malformed.
-
initialize
default void initialize(Cache cache, java.util.Properties properties)
Initializes a user-defined object, owned by the given cache, using the given properties. Note that any uncaught exception thrown by this method will cause theCacheinitialization to fail. Note that if this method is implemented then the deprecated init method should not be implemented. The product will call both methods assuming that only one will have a non-default implementation.- Parameters:
cache- the cache that owns this declarableproperties- Contains the parameters declared in the declarative xml file.- Throws:
java.lang.IllegalArgumentException- should be thrown if properties contains something unexpected.- Since:
- Geode 1.5
-
-