public interface AsyncReference<T> extends AsyncReferenceProxy<T>, net.kuujo.copycat.resource.Resource<AsyncReference<T>>
| Modifier and Type | Method and Description |
|---|---|
static <T> AsyncReference<T> |
create(String name)
Creates a new asynchronous atomic reference with the default cluster configuration.
|
static <T> AsyncReference<T> |
create(String name,
net.kuujo.copycat.cluster.ClusterConfig cluster)
Creates a new asynchronous atomic reference with the default atomic reference configuration.
|
static <T> AsyncReference<T> |
create(String name,
net.kuujo.copycat.cluster.ClusterConfig cluster,
AsyncReferenceConfig config)
Creates a new asynchronous atomic reference.
|
compareAndSet, get, getAndSet, setstatic <T> AsyncReference<T> create(String name)
The atomic reference will be constructed with the default cluster configuration. The default cluster configuration
searches for two resources on the classpath - cluster and {cluster-defaults} - in that order. Configuration
options specified in cluster.conf will override those in {cluster-defaults.conf}.
Additionally, the atomic reference will be constructed with an atomic reference configuration that searches the classpath for
three configuration files - {name}, atomic, atomic-defaults, resource, and
resource-defaults - in that order. The first resource is a configuration resource with the same name
as the atomic reference resource. If the resource is namespaced - e.g. `references.my-reference.conf` - then resource
configurations will be loaded according to namespaces as well; for example, `references.conf`.
T - The atomic reference data type.name - The asynchronous atomic reference name.static <T> AsyncReference<T> create(String name, net.kuujo.copycat.cluster.ClusterConfig cluster)
The atomic reference will be constructed with an atomic reference configuration that searches the classpath for three
configuration files - {name}, atomic, atomic-defaults, resource, and
resource-defaults - in that order. The first resource is a configuration resource with the same name
as the atomic reference resource. If the resource is namespaced - e.g. `references.my-reference.conf` - then resource
configurations will be loaded according to namespaces as well; for example, `references.conf`.
T - The atomic reference data type.name - The asynchronous atomic reference name.cluster - The cluster configuration.static <T> AsyncReference<T> create(String name, net.kuujo.copycat.cluster.ClusterConfig cluster, AsyncReferenceConfig config)
T - The atomic reference data type.name - The asynchronous atomic reference name.cluster - The cluster configuration.config - The atomic reference configuration.Copyright © 2013-2015. All Rights Reserved.