org.apache.geode.cache

## 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, PartitionResolver<K,V>, RegionMembershipListener<K,V>, RegionRoleListener<K,V>, ServerLoadProbe, TransactionListener, TransactionWriter
  All Known Implementing Classes:
    AutoBalancer, CacheListenerAdapter, CacheWriterAdapter, CqListenerAdapter, CreateRegionFunction, DebugCacheListener, GatewayDeltaEventApplicationCacheListener, GatewayDeltaForwarderCacheListener, LocalSessionCacheLoader, LocalSessionCacheWriter, ReflectionBasedAutoSerializer, RegionConfigurationCacheListener, RegionMembershipListenerAdapter, RegionRoleListenerAdapter, RegionSizeFunction, ServerLoadProbeAdapter, SessionCustomExpiry, SessionExpirationCacheListener, StringPrefixPartitionResolver, TouchPartitionedRegionEntriesFunction, TouchReplicatedRegionEntriesFunction, TransactionListenerAdapter

      public interface Declarable

  An 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 `CacheLoader` in 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.DBLoader` must implement both the `CacheLoader` and `Declarable` interfaces. The cache service will construct a `com.company.app.DBLoader` object by invoking the loader's zero-argument constructor and then calling the `init(java.util.Properties)` method to pass in the parameters.

  See package introduction.

  Since:
    GemFire 2.0

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `init(java.util.Properties props)` Initializes a user-defined object using the given properties.

- - ### Method Detail

    - #### init

          default void init(java.util.Properties props)

      Initializes a user-defined object using the given properties. Note that any uncaught exception thrown by this method will cause the `Cache` initialization to fail.
      Parameters:
        `props` - Contains the parameters declared in the declarative xml file.
      Throws:
        `java.lang.IllegalArgumentException` - If one of the configuration options in `props` is illegal or malformed.