E - type set elements.public interface DistributedSetBuilder<E>
| Modifier and Type | Method and Description |
|---|---|
DistributedSet<E> |
build()
Builds an set based on the configuration options
supplied to this builder.
|
DistributedSetBuilder<E> |
withApplicationId(ApplicationId id)
Sets the owner applicationId for the set.
|
DistributedSetBuilder<E> |
withMeteringDisabled()
Instantiate Metrics service to gather usage and performance metrics.
|
DistributedSetBuilder<E> |
withName(String name)
Sets the name of the set.
|
DistributedSetBuilder<E> |
withPartitionsDisabled()
Disables distribution of set entries across multiple database partitions.
|
DistributedSetBuilder<E> |
withPurgeOnUninstall()
Purges set contents when the application owning the set is uninstalled.
|
DistributedSetBuilder<E> |
withRelaxedReadConsistency()
Provides weak consistency for set reads.
|
DistributedSetBuilder<E> |
withSerializer(Serializer serializer)
Sets a serializer that can be used to serialize
the elements add to the set.
|
DistributedSetBuilder<E> |
withUpdatesDisabled()
Disables set updates.
|
DistributedSetBuilder<E> withName(String name)
Each set is identified by a unique name.
Note: This is a mandatory parameter.
name - name of the setDistributedSetBuilder<E> withApplicationId(ApplicationId id)
Note: If purgeOnUninstall option is enabled, applicationId
must be specified.
id - applicationId owning the setDistributedSetBuilder<E> withSerializer(Serializer serializer)
Note: This is a mandatory parameter.
serializer - serializerDistributedSetBuilder<E> withUpdatesDisabled()
Attempt to update the built set will throw UnsupportedOperationException.
DistributedSetBuilder<E> withRelaxedReadConsistency()
While this can lead to improved read performance, it can also make the behavior heard to reason. Only turn this on if you know what you are doing. By default reads are strongly consistent.
DistributedSetBuilder<E> withPartitionsDisabled()
When partitioning is disabled, the returned set will have a single partition that spans the entire cluster. Furthermore, the changes made to the set are ephemeral and do not survive a full cluster restart.
Disabling partitions is more appropriate when the returned set is used for simple coordination activities and not for long term data persistence.
Note: By default partitions are enabled and entries in the set are durable.
DistributedSetBuilder<E> withMeteringDisabled()
DistributedSetBuilder<E> withPurgeOnUninstall()
When this option is enabled, the caller must provide a applicationId via
the withAppliationId builder method.
By default set contents will NOT be purged when owning application is uninstalled.
DistributedSet<E> build()
RuntimeException - if a mandatory parameter is missingCopyright © 2015. All rights reserved.