Interface GemFireCache

    • Method Detail

      • getName

        java.lang.String getName()
        Returns the name of this cache. This method does not throw CacheClosedException if the cache is closed.
        Returns:
        the String name of this cache
      • getDistributedSystem

        DistributedSystem getDistributedSystem()
        Returns the distributed system used by this cache. This method does not throw CacheClosedException if the cache is closed.
        Returns:
        the distributed system used by this cache
      • getResourceManager

        ResourceManager getResourceManager()
        Returns the ResourceManager for managing this cache's resources.
        Returns:
        ResourceManager for managing this cache's resources
        Since:
        GemFire 6.0
      • setCopyOnRead

        void setCopyOnRead​(boolean copyOnRead)
        Sets the "copy on read" feature for cache read operations.
        Parameters:
        copyOnRead - whether the "copy on read" feature should be enabled
        Since:
        GemFire 4.0
      • getCopyOnRead

        boolean getCopyOnRead()
        Indicates whether the "copy on read" is enabled for this cache.
        Returns:
        true if "copy on read" is enabled, false otherwise.
        Since:
        GemFire 4.0
      • getRegionAttributes

        <K,​V> RegionAttributes<K,​V> getRegionAttributes​(java.lang.String id)
        Returns the RegionAttributes with the given id or null if no RegionAttributes with that id exists.
        Type Parameters:
        K - the type of keys in the region
        V - the type of values in the region
        Parameters:
        id - the id of the RegionAttributes
        Returns:
        the RegionAttributes with the given id
        Since:
        GemFire 4.1
        See Also:
        setRegionAttributes(java.lang.String, org.apache.geode.cache.RegionAttributes<K, V>)
      • setRegionAttributes

        <K,​V> void setRegionAttributes​(java.lang.String id,
                                             RegionAttributes<K,​V> attrs)
        Sets the id of the given RegionAttributes. If a region attributes named name already exists, the mapping will be overwritten with attrs. However, changing the mapping will not effect existing regions.
        Type Parameters:
        K - the type of keys in the region
        V - the type of values in the region
        Parameters:
        id - The id of the region attributes
        attrs - The attributes to associate with id. If attrs is null, any existing RegionAttributes associated with id will be removed.
        Since:
        GemFire 4.1
        See Also:
        getRegionAttributes(java.lang.String)
      • listRegionAttributes

        <K,​V> java.util.Map<java.lang.String,​RegionAttributes<K,​V>> listRegionAttributes()
        Returns an unmodifiable mapping of ids to region attributes. The keys of the map are Strings and the values of the map are RegionAttributes.
        Type Parameters:
        K - the type of keys in the region
        V - the type of values in the region
        Returns:
        an unmodifiable mapping of ids to region attributes
        Since:
        GemFire 4.1
      • getLogger

        LogWriter getLogger()
        Gets the logging object for GemFire. This method does not throw CacheClosedException if the cache is closed.
        Returns:
        the logging object
      • getSecurityLogger

        LogWriter getSecurityLogger()
        Gets the security logging object for GemFire. This method does not throw CacheClosedException if the cache is closed.
        Returns:
        the security logging object
      • findDiskStore

        DiskStore findDiskStore​(java.lang.String name)
        Returns the DiskStore by name or null if no disk store is found.
        Parameters:
        name - the name of the disk store to find. If null then the default disk store, if it exists, is returned.
        Returns:
        the DiskStore by name or null if no disk store is found
        Since:
        GemFire 6.5
      • registerPdxMetaData

        void registerPdxMetaData​(java.lang.Object instance)
        Registers PDX meta-data given an instance of a domain class that will be serialized with PDX.

        Note that this method serializes the given instance so PDX must already be configured to do the serialization.

        Note that if the instance is not of a class that will be serialized with PDX then no meta-data is registered.

        Note that in most cases this method never needs to be called. Currently it is only needed by the JdbcLoader when gets are done for JDBC data that was not written to the table using geode.

        Parameters:
        instance - the instance of the domain class for which meta-data is to be registered
        Throws:
        SerializationException - if the instance can not be serialized or is not serialized with PDX
        Since:
        Geode 1.6
      • getCacheTransactionManager

        CacheTransactionManager getCacheTransactionManager()
        Get the CacheTransactionManager instance for this Cache.
        Returns:
        The CacheTransactionManager instance.
        Throws:
        CacheClosedException - if the cache is closed.
        Since:
        GemFire 4.0
      • getJNDIContext

        javax.naming.Context getJNDIContext()
        Returns the JNDI context associated with the Cache.
        Returns:
        javax.naming.Context Added as part of providing JTA implementation in Gemfire.
        Since:
        GemFire 4.0
      • getInitializer

        Declarable getInitializer()
        Returns the Declarable used to initialize this cache or null if it does not have an initializer.
        Returns:
        the Declarable used to initialize this cache
        Since:
        GemFire 6.6
      • getInitializerProps

        java.util.Properties getInitializerProps()
        Returns the Properties used to initialize the cache initializer or null if no initializer properties exist.
        Returns:
        the Properties used to initialize the cache initializer
        Since:
        GemFire 6.6