Class DTypeFactory

  • java.lang.Object
    • dev.gemfire.dtype.DTypeFactory

  • public class DTypeFactory
    extends java.lang.Object
    The DTypeFactory is the primary means to access and create distributed types. It requires supplying a ClientCache instance for initializing.

    Instances are created or retrieved if a named type already exists. Thus, the same call can be used by different clients, but only one backend instance will be created as necessary.

    Created instances should be explicitly removed using destroy(). This will remove the entry from the backing region. This is a cluster-wide operation, meaning that other clients will error or produce unexpected results if trying to operate on an instance that has been destroyed elsewhere.

    Implementation_Note
    The current implementation uses a PARTITION_REDUNDANT backing region, named /DTYPES, to store entries.
    • Field Detail

      • DTYPES_REGION

        public static final java.lang.String DTYPES_REGION
      • DTYPES_CACHING_REGION

        public static final java.lang.String DTYPES_CACHING_REGION
    • Constructor Detail

      • DTypeFactory

        public DTypeFactory​(org.apache.geode.cache.client.ClientCache clientCache)
        Instantiate a factory instance used to create specific distributed types.
        Parameters:
        clientCache - a ClientCache which is used to interact with the backend cluster
    • Method Detail

      • createDAtomicLong

        public DAtomicLong createDAtomicLong​(java.lang.String name)
      • createDAtomicLong

        public DAtomicLong createDAtomicLong​(java.lang.String name,
                                             long initialValue)
      • createDList

        public <E> DList<E> createDList​(java.lang.String name)
      • createDSet

        public <E> DSet<E> createDSet​(java.lang.String name)
      • createDSemaphore

        public DSemaphore createDSemaphore​(java.lang.String name,
                                           int permits)
      • close

        public void close()
      • createDBlockingQueue

        public <E> DBlockingQueue<E> createDBlockingQueue​(java.lang.String name)
      • createDBlockingQueue

        public <E> DBlockingQueue<E> createDBlockingQueue​(java.lang.String name,
                                                          int capacity)
      • createDCircularQueue

        public <E> DCircularQueue<E> createDCircularQueue​(java.lang.String name,
                                                          int capacity)
      • createDAtomicReference

        public <V> DAtomicReference<V> createDAtomicReference​(java.lang.String name,
                                                              V object)
      • createDAtomicReference

        public <V> DAtomicReference<V> createDAtomicReference​(java.lang.String name)
      • createDCountDownLatch

        public DCountDownLatch createDCountDownLatch​(java.lang.String name,
                                                     int count)
        Create or retrieve a DCountDownLatch with a given count. If the latch already exists, the existing count is not changed and the passed value is ignored.
        Parameters:
        name - the name of the latch to be created or retrieved
        count - the initial value of the latch
        Returns:
        a DCountDownLatch
      • createDCounter

        public DCounter createDCounter​(java.lang.String name)
      • createDCounter

        public DCounter createDCounter​(java.lang.String name,
                                       int initialValue)