|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.jca.HazelcastConnectionImpl
public class HazelcastConnectionImpl
Implementation class of HazelcastConnectionImpl
| Constructor Summary | |
|---|---|
HazelcastConnectionImpl(ManagedConnectionImpl managedConnectionImpl,
Subject subject)
|
|
| Method Summary | ||
|---|---|---|
String |
addDistributedObjectListener(DistributedObjectListener distributedObjectListener)
Adds a Distributed Object listener which will be notified when a new DistributedObject will be created or destroyed. |
|
void |
close()
|
|
javax.resource.cci.Interaction |
createInteraction()
|
|
|
executeTransaction(TransactionalTask<T> task)
Executes the given transactional task in current thread using default options and returns the result of the task. |
|
|
executeTransaction(TransactionOptions options,
TransactionalTask<T> task)
Executes the given transactional task in current thread using given options and returns the result of the task. |
|
IAtomicLong |
getAtomicLong(String name)
Creates cluster-wide atomic long. |
|
|
getAtomicReference(String name)
Creates cluster-wide atomic reference. |
|
ClientService |
getClientService()
Returns the client service of this Hazelcast instance. |
|
Cluster |
getCluster()
Returns the Cluster that this Hazelcast instance is part of. |
|
Config |
getConfig()
Returns the configuration of this Hazelcast instance. |
|
ICountDownLatch |
getCountDownLatch(String name)
Creates cluster-wide CountDownLatch. |
|
|
getDistributedObject(String serviceName,
Object id)
Deprecated. |
|
|
getDistributedObject(String serviceName,
String name)
|
|
Collection<DistributedObject> |
getDistributedObjects()
Returns all DistributedObject's such as; queue, map, set, list, topic, lock, multimap. |
|
IExecutorService |
getExecutorService(String name)
Returns the distributed executor service for the given name. |
|
IdGenerator |
getIdGenerator(String name)
Creates cluster-wide unique IDs. |
|
JobTracker |
getJobTracker(String name)
Returns the job tracker instance with the specified name. |
|
LifecycleService |
getLifecycleService()
Returns the lifecycle service for this instance. |
|
|
getList(String name)
Returns the distributed list instance with the specified name. |
|
Endpoint |
getLocalEndpoint()
Returns the local Endpoint which this HazelcastInstance belongs to. |
|
HazelcastTransaction |
getLocalTransaction()
|
|
ILock |
getLock(Object key)
Deprecated. |
|
ILock |
getLock(String key)
Returns the distributed lock instance for the specified key object. |
|
LoggingService |
getLoggingService()
Returns the logging service of this Hazelcast instance. |
|
|
getMap(String name)
Returns the distributed map instance with the specified name. |
|
javax.resource.cci.ConnectionMetaData |
getMetaData()
|
|
|
getMultiMap(String name)
Returns the distributed multimap instance with the specified name. |
|
String |
getName()
Returns the name of this Hazelcast instance |
|
PartitionService |
getPartitionService()
Returns the partition service of this Hazelcast instance. |
|
|
getQueue(String name)
Returns the distributed queue instance with the specified name. |
|
QuorumService |
getQuorumService()
Returns the quorum service of this Hazelcast instance. |
|
|
getReliableTopic(String name)
Returns the reliable ReliableTopic instance with the specified name. |
|
|
getReplicatedMap(String name)
Returns the replicated map instance with the specified name. |
|
javax.resource.cci.ResultSetInfo |
getResultSetInfo()
|
|
|
getRingbuffer(String name)
Returns the distributed Ringbuffer instance with the specified name. |
|
ISemaphore |
getSemaphore(String name)
Creates cluster-wide semaphore. |
|
|
getSet(String name)
Returns the distributed set instance with the specified name. |
|
|
getTopic(String name)
Returns the distributed topic instance with the specified name. |
|
|
getTransactionalList(String name)
|
|
|
getTransactionalMap(String name)
|
|
|
getTransactionalMultiMap(String name)
|
|
|
getTransactionalQueue(String name)
|
|
|
getTransactionalSet(String name)
|
|
ConcurrentMap<String,Object> |
getUserContext()
Returns a ConcurrentMap that can be used to add user-context to the HazelcastInstance. |
|
HazelcastXAResource |
getXAResource()
Gets xaResource which will participate in XATransaction. |
|
TransactionContext |
newTransactionContext()
Creates a new TransactionContext associated with the current thread using default options. |
|
TransactionContext |
newTransactionContext(TransactionOptions options)
Creates a new TransactionContext associated with the current thread with given options. |
|
boolean |
removeDistributedObjectListener(String registrationId)
Removes the specified Distributed Object listener. |
|
void |
shutdown()
Shuts down this HazelcastInstance. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HazelcastConnectionImpl(ManagedConnectionImpl managedConnectionImpl,
Subject subject)
| Method Detail |
|---|
public void close()
throws javax.resource.ResourceException
close in interface javax.resource.cci.Connectionjavax.resource.ResourceException
public javax.resource.cci.Interaction createInteraction()
throws javax.resource.ResourceException
createInteraction in interface javax.resource.cci.Connectionjavax.resource.ResourceException
public javax.resource.cci.ResultSetInfo getResultSetInfo()
throws javax.resource.NotSupportedException
getResultSetInfo in interface javax.resource.cci.Connectionjavax.resource.NotSupportedException - as this is not supported by this resource adapter
public HazelcastTransaction getLocalTransaction()
throws javax.resource.ResourceException
getLocalTransaction in interface javax.resource.cci.Connectionjavax.resource.ResourceException
public javax.resource.cci.ConnectionMetaData getMetaData()
throws javax.resource.ResourceException
getMetaData in interface javax.resource.cci.Connectionjavax.resource.ResourceExceptionpublic String toString()
toString in class Objectpublic <K,V> IMap<K,V> getMap(String name)
HazelcastInstance
getMap in interface HazelcastInstancename - name of the distributed map
public <E> IQueue<E> getQueue(String name)
HazelcastInstance
getQueue in interface HazelcastInstancename - name of the distributed queue
public <E> ITopic<E> getTopic(String name)
HazelcastInstance
getTopic in interface HazelcastInstancename - name of the distributed topic
public <E> ITopic<E> getReliableTopic(String name)
HazelcastInstance
getReliableTopic in interface HazelcastInstancename - name of the reliable ITopic
public <E> ISet<E> getSet(String name)
HazelcastInstance
getSet in interface HazelcastInstancename - name of the distributed set
public <E> IList<E> getList(String name)
HazelcastInstance
getList in interface HazelcastInstancename - name of the distributed list
public <K,V> MultiMap<K,V> getMultiMap(String name)
HazelcastInstance
getMultiMap in interface HazelcastInstancename - name of the distributed multimap
public IExecutorService getExecutorService(String name)
HazelcastInstanceNote: Note that it don't support invokeAll/Any and don't have standard shutdown behavior
getExecutorService in interface HazelcastInstancename - name of the executor service
public IAtomicLong getAtomicLong(String name)
HazelcastInstanceIAtomicLong is distributed
implementation of java.util.concurrent.atomic.AtomicLong.
getAtomicLong in interface HazelcastInstancename - name of the IAtomicLong proxy
public ICountDownLatch getCountDownLatch(String name)
HazelcastInstanceICountDownLatch is distributed
implementation of java.util.concurrent.CountDownLatch.
getCountDownLatch in interface HazelcastInstancename - name of the ICountDownLatch proxy
ICountDownLatch proxy for the given namepublic ISemaphore getSemaphore(String name)
HazelcastInstanceISemaphore is distributed
implementation of java.util.concurrent.Semaphore.
getSemaphore in interface HazelcastInstancename - name of the ISemaphore proxy
ISemaphore proxy for the given namepublic Collection<DistributedObject> getDistributedObjects()
HazelcastInstanceDistributedObject's such as; queue, map, set, list, topic, lock, multimap.
getDistributedObjects in interface HazelcastInstancepublic String addDistributedObjectListener(DistributedObjectListener distributedObjectListener)
HazelcastInstanceDistributedObject will be created or destroyed.
addDistributedObjectListener in interface HazelcastInstancedistributedObjectListener - instance listener
public boolean removeDistributedObjectListener(String registrationId)
HazelcastInstance
removeDistributedObjectListener in interface HazelcastInstanceregistrationId - Id of listener registration.
public Config getConfig()
HazelcastInstance
getConfig in interface HazelcastInstancepublic PartitionService getPartitionService()
HazelcastInstance
getPartitionService in interface HazelcastInstancepublic QuorumService getQuorumService()
HazelcastInstance
getQuorumService in interface HazelcastInstancepublic ClientService getClientService()
HazelcastInstance
getClientService in interface HazelcastInstanceClientService of this Hazelcast instance.public LoggingService getLoggingService()
HazelcastInstance
getLoggingService in interface HazelcastInstance
@Deprecated
public <T extends DistributedObject> T getDistributedObject(String serviceName,
Object id)
getDistributedObject in interface HazelcastInstanceT - type of the DistributedObjectserviceName - name of the serviceid - identifier of the object
public <T extends DistributedObject> T getDistributedObject(String serviceName,
String name)
getDistributedObject in interface HazelcastInstanceT - type of the DistributedObjectserviceName - name of the servicename - name of the object
public ConcurrentMap<String,Object> getUserContext()
HazelcastInstanceHazelcastInstanceAware interface when submitting a Runnable/Callable to
Hazelcast ExecutorService. By storing the dependencies in the user-context, they can be retrieved as soon
as you have a reference to the HazelcastInstance.
This structure is purely local and Hazelcast remains agnostic abouts its content.
getUserContext in interface HazelcastInstancepublic <K,V> TransactionalMap<K,V> getTransactionalMap(String name)
getTransactionalMap in interface HazelcastConnectionTransactionalTaskContext.getMap(String)public <E> TransactionalQueue<E> getTransactionalQueue(String name)
getTransactionalQueue in interface HazelcastConnectionTransactionalTaskContext.getQueue(String)public <K,V> TransactionalMultiMap<K,V> getTransactionalMultiMap(String name)
getTransactionalMultiMap in interface HazelcastConnectionTransactionalTaskContext.getMultiMap(String)public <E> TransactionalList<E> getTransactionalList(String name)
getTransactionalList in interface HazelcastConnectionTransactionalTaskContext.getList(String)public <E> TransactionalSet<E> getTransactionalSet(String name)
getTransactionalSet in interface HazelcastConnectionTransactionalTaskContext.getSet(String)public IdGenerator getIdGenerator(String name)
HazelcastInstance
getIdGenerator in interface HazelcastInstancename - name of the IdGenerator
public <E> IAtomicReference<E> getAtomicReference(String name)
HazelcastInstanceIAtomicReference is distributed
implementation of java.util.concurrent.atomic.AtomicReference.
getAtomicReference in interface HazelcastInstancename - name of the IAtomicReference proxy
IAtomicReference proxy for the given namepublic <K,V> ReplicatedMap<K,V> getReplicatedMap(String name)
HazelcastInstance
getReplicatedMap in interface HazelcastInstancename - name of the distributed map
public <E> Ringbuffer<E> getRingbuffer(String name)
HazelcastInstance
getRingbuffer in interface HazelcastInstancename - name of the distributed Ringbuffer
public JobTracker getJobTracker(String name)
HazelcastInstance
getJobTracker in interface HazelcastInstancename - name of the job tracker
public String getName()
HazelcastInstance
getName in interface HazelcastInstancepublic ILock getLock(String key)
HazelcastInstance
Lock lock = hazelcastInstance.getLock("PROCESS_LOCK");
lock.lock();
try {
// process
} finally {
lock.unlock();
}
getLock in interface HazelcastInstancekey - key of the lock instance
@Deprecated public ILock getLock(Object key)
getLock in interface HazelcastInstancepublic Cluster getCluster()
HazelcastInstance
getCluster in interface HazelcastInstancepublic Endpoint getLocalEndpoint()
HazelcastInstanceMember instance for cluster nodes
and a Client instance for clients.
getLocalEndpoint in interface HazelcastInstanceEndpoint which this HazelcastInstance belongs toMember,
Clientpublic HazelcastXAResource getXAResource()
HazelcastInstance
getXAResource in interface HazelcastInstancepublic LifecycleService getLifecycleService()
HazelcastInstance
getLifecycleService in interface HazelcastInstancepublic void shutdown()
HazelcastInstanceLifecycleService.shutdown().
shutdown in interface HazelcastInstance
public <T> T executeTransaction(TransactionalTask<T> task)
throws TransactionException
HazelcastInstance
executeTransaction in interface HazelcastInstanceT - return type of tasktask - the transactional task to be executed
TransactionException - if an error occurs during transaction.
public <T> T executeTransaction(TransactionOptions options,
TransactionalTask<T> task)
throws TransactionException
HazelcastInstance
executeTransaction in interface HazelcastInstanceT - return type of taskoptions - options for this transactional tasktask - task to be executed
TransactionException - if an error occurs during transaction.public TransactionContext newTransactionContext()
HazelcastInstance
newTransactionContext in interface HazelcastInstancepublic TransactionContext newTransactionContext(TransactionOptions options)
HazelcastInstance
newTransactionContext in interface HazelcastInstanceoptions - options for this transaction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||