Tanzu GemFire Distributed Types Java API Reference
Package dev.gemfire.dtype
Class DTypeFactory
- java.lang.Object
-
- dev.gemfire.dtype.DTypeFactory
-
public class DTypeFactory extends java.lang.ObjectTheDTypeFactoryis the primary means to access and create distributed types. It requires supplying aClientCacheinstance 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 Summary
Fields Modifier and Type Field Description static java.lang.StringDTYPES_CACHING_REGIONstatic java.lang.StringDTYPES_REGION
-
Constructor Summary
Constructors Constructor Description DTypeFactory(org.apache.geode.cache.client.ClientCache clientCache)Instantiate a factory instance used to create specific distributed types.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()DAtomicLongcreateDAtomicLong(java.lang.String name)DAtomicLongcreateDAtomicLong(java.lang.String name, long initialValue)<V> DAtomicReference<V>createDAtomicReference(java.lang.String name)<V> DAtomicReference<V>createDAtomicReference(java.lang.String name, V object)<E> DBlockingQueue<E>createDBlockingQueue(java.lang.String name)<E> DBlockingQueue<E>createDBlockingQueue(java.lang.String name, int capacity)<E> DCircularQueue<E>createDCircularQueue(java.lang.String name, int capacity)DCountDownLatchcreateDCountDownLatch(java.lang.String name, int count)Create or retrieve a DCountDownLatch with a given count.DCountercreateDCounter(java.lang.String name)DCountercreateDCounter(java.lang.String name, int initialValue)<E> DList<E>createDList(java.lang.String name)DSemaphorecreateDSemaphore(java.lang.String name, int permits)<E> DSet<E>createDSet(java.lang.String name)
-
-
-
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 retrievedcount- 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)
-
-