Package com.vmware.gemfire.distributedtypes


package com.vmware.gemfire.distributedtypes
GemFire Distributed Types

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

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);
 
  • Class
    Description
    An 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 of AtomicReferences.
    An implementation of a BlockingDeque that is distributed and highly available.
    An implementation of a Queue that 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.
    A DList is a distributed and highly available List that is backed by a GemFire cluster.
    DSemaphore is a highly-available, distributed version of the JDK's Semaphore.
    DSet<E>
    A DSet is a distributed and highly available Set that 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 Types
    General exception class for distributed types
    The DTypeFactory is 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 /DTYPES region.
    An exception typically thrown when attempting to access an instance that has been destroyed.