public class HazelcastDistributedDataStructureService extends AbstractDependentService implements DistributedDataStructureService
This service is thread-safe.
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
Constructor and Description |
---|
HazelcastDistributedDataStructureService() |
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
protected void |
doStop() |
<K,V> DMap<K,V> |
getMap(name : String)
Replies the
DMap with the given name. |
<K,V> DMap<K,V> |
getMap(name : String,
comparator : Comparator<? super K>)
Replies the
DMap with the given name. |
<K,V> DMultiMap<K,V> |
getMultiMap(name : String)
Replies the
DMultiMap with the given name. |
<K,V> DMultiMap<K,V> |
getMultiMap(name : String,
comparator : Comparator<? super K>)
Replies the
DMultiMap with the given name. |
Class<? extends com.google.common.util.concurrent.Service> |
getServiceType()
Replies the service interface implemented by this service.
|
getServiceDependencies, getServiceWeakDependencies
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getServiceDependencies, getServiceWeakDependencies
public final def
getServiceType() : Class<? extends com.google.common.util.concurrent.Service>
DependentService
getServiceType
in interface DependentService
protected def
doStart() : void
doStart
in class com.google.common.util.concurrent.AbstractService
protected def
doStop() : void
doStop
in class com.google.common.util.concurrent.AbstractService
publicdef
getMap(name : String) : DMap<K,V>with
<K,V>
DistributedDataStructureService
DMap
with the given name.
This function permits to create a map for keys without a natural order, and without a specific comparator. An object has a
natural order if it implements Comparable
.
This function is equivalent to create a HashMap
in the standard Java API. If the keys have a natural order,
i.e. they implement the Comparable
interface, or if you are able to provide a Comparator
, then it is
recommended to use DistributedDataStructureService.getMap(String, Comparator)
in place of the function DistributedDataStructureService.getMap(String)
.
getMap
in interface DistributedDataStructureService
K
- - types of the keys in the map.V
- - types of the values in the map.name
- name of the shared map.DistributedDataStructureService.getMap(String, Comparator)
publicdef
getMap(name : String, comparator : Comparator<? super K>) : DMap<K,V>with
<K,V>
DistributedDataStructureService
DMap
with the given name.
This function permits to create a map for keys with a natural order, OR with a specific comparator. An object has a natural
order if it implements Comparable
. If the comparator is null
, then the natural order of the keys is
used.
This function is equivalent to create a TreeMap
in the standard Java API. If the keys have not a natural
order, i.e. they not implement the Comparable
interface, or if you are not able to provide a Comparator
,
then it is recommended to use DistributedDataStructureService.getMap(String)
in place of the function DistributedDataStructureService.getMap(String, Comparator)
.
getMap
in interface DistributedDataStructureService
K
- - types of the keys in the map.V
- - types of the values in the map.name
- name of the shared map.comparator
- the comparator of the keys.DistributedDataStructureService.getMap(String)
publicdef
getMultiMap(name : String) : DMultiMap<K,V>with
<K,V>
DistributedDataStructureService
DMultiMap
with the given name.
This function permits to create a map for keys without a natural order, and without a specific comparator. An object has a
natural order if it implements Comparable
.
This function is equivalent to create a HashMap
in the standard Java API. If the keys have a natural order,
i.e. they implement the Comparable
interface, or if you are able to provide a Comparator
, then it is
recommended to use DistributedDataStructureService.getMultiMap(String, Comparator)
in place of the function DistributedDataStructureService.getMultiMap(String)
.
getMultiMap
in interface DistributedDataStructureService
K
- - types of the keys in the map.V
- - types of the values in the map.name
- name of the shared multi-map.DistributedDataStructureService.getMultiMap(String, Comparator)
publicdef
getMultiMap(name : String, comparator : Comparator<? super K>) : DMultiMap<K,V>with
<K,V>
DistributedDataStructureService
DMultiMap
with the given name.
This function permits to create a map for keys with a natural order, OR with a specific comparator. An object has a natural
order if it implements Comparable
. If the comparator is null
, then the natural order of the keys is
used.
This function is equivalent to create a TreeMap
in the standard Java API. If the keys have not a natural
order, i.e. they not implement the Comparable
interface, or if you are not able to provide a Comparator
,
then it is recommended to use DistributedDataStructureService.getMultiMap(String)
in place of the function
DistributedDataStructureService.getMultiMap(String, Comparator)
.
getMultiMap
in interface DistributedDataStructureService
K
- - types of the keys in the map.V
- - types of the values in the map.name
- name of the shared multi-map.comparator
- the comparator of the keys.DistributedDataStructureService.getMultiMap(String)
Copyright © 2018 the original authors or authors.