Tanzu GemFire Distributed Types Java API Reference
Package com.vmware.gemfire.distributedtypes
This is a collection of various Java data types that are backed by GemFire, thus making them naturally distributed and highly available.
The following types are provided
DListDSetDBlockingQueueDCircularQueueDAtomicLongDSemaphoreDAtomicReferenceDCountDownLatchDSnowflakeId
Distributed Type instances are created with a
DTypeFactory. For
example:
ClientCache client = new ClientCacheFactory()
.addPoolLocator("localhost", locatorPort)
.create();
DTypeFactory factory = new DTypeFactory(client);
DList<String> list = factory.createDList("myList");
DSet<Account> accounts = factory.createDSet("accounts");
DSemaphore semaphore = factory.createDSemaphore("semaphore", 1);
DBlockingQueue<String> queue = factory.createDQueue("queue", 5);
DCircularQueue<Requests> queue = factory.createDCircularQueue("requests", 1000);
The various types are intended for use from GemFire clients and allow for concurrent and
distributed access from clients running in different JVMs. Client structures hold almost no state
and most all operations are performed on backend structures that are stored and managed by
GemFire.
Note that iteration operations will serialize and retrieve the full structure to the client.
Iteration is not performed remotely on the server. Only DList supports removal of
elements when iterating.
Operations that take lambdas as arguments need to ensure that the lambda is also declared as
Serializable. For example, the method removeIf(Predicate) could be used as:
// DSet<Integer> set = .... set.removeIf((Predicate<Integer> & Serializable) x -> x % 2 == 0);
-
ClassDescriptionAn exception that is thrown by the server to indicate that it 'seems' as though the client has disconnected.A distributed and highly-available implementation of
AtomicLongs.A distributed and highly-available implementation ofAtomicReferences.An implementation of aBlockingDequethat is distributed and highly available.An implementation of aQueuethat provides a first-in first-out queue with a fixed size that replaces its oldest element if full.A distributed type, similar to a DAtomicLong, but with higher throughput and less potential contention than DAtomicLong.DList<E>A DList is a distributed and highly availableListthat is backed by a GemFire cluster.DSemaphore is a highly-available, distributed version of the JDK'sSemaphore.DSet<E>A DSet is a distributed and highly availableSetthat is backed by a GemFire cluster.DSnowflakeId is a cluster-unique ID generator based on the Twitter/X Snowflake design.Builder used to create custom DSnowflakeIds.Base interface for all Distributed TypesGeneral exception class for distributed typesTheDTypeFactoryis the primary means to access and create distributed types.A scoped factory that creates distributed types backed by a user-supplied region rather than the default/DTYPESregion.An exception typically thrown when attempting to access an instance that has been destroyed.