Search in sources :

Example 1 with XAService

use of com.hazelcast.transaction.impl.xa.XAService in project hazelcast by hazelcast.

the class ServiceManagerImpl method registerDefaultServices.

private void registerDefaultServices(ServicesConfig servicesConfig) {
    if (!servicesConfig.isEnableDefaults()) {
        return;
    }
    logger.finest("Registering default services...");
    registerService(MapService.SERVICE_NAME, createService(MapService.class));
    registerService(LockService.SERVICE_NAME, new LockServiceImpl(nodeEngine));
    registerService(QueueService.SERVICE_NAME, new QueueService(nodeEngine));
    registerService(TopicService.SERVICE_NAME, new TopicService());
    registerService(ReliableTopicService.SERVICE_NAME, new ReliableTopicService(nodeEngine));
    registerService(MultiMapService.SERVICE_NAME, new MultiMapService(nodeEngine));
    registerService(ListService.SERVICE_NAME, new ListService(nodeEngine));
    registerService(SetService.SERVICE_NAME, new SetService(nodeEngine));
    registerService(DistributedExecutorService.SERVICE_NAME, new DistributedExecutorService());
    registerService(DistributedDurableExecutorService.SERVICE_NAME, new DistributedDurableExecutorService(nodeEngine));
    registerService(AtomicLongService.SERVICE_NAME, new AtomicLongService());
    registerService(AtomicReferenceService.SERVICE_NAME, new AtomicReferenceService());
    registerService(CountDownLatchService.SERVICE_NAME, new CountDownLatchService());
    registerService(SemaphoreService.SERVICE_NAME, new SemaphoreService(nodeEngine));
    registerService(IdGeneratorService.SERVICE_NAME, new IdGeneratorService(nodeEngine));
    registerService(MapReduceService.SERVICE_NAME, new MapReduceService(nodeEngine));
    registerService(ReplicatedMapService.SERVICE_NAME, new ReplicatedMapService(nodeEngine));
    registerService(RingbufferService.SERVICE_NAME, new RingbufferService(nodeEngine));
    registerService(XAService.SERVICE_NAME, new XAService(nodeEngine));
    registerService(CardinalityEstimatorService.SERVICE_NAME, new CardinalityEstimatorService());
    registerService(DistributedScheduledExecutorService.SERVICE_NAME, new DistributedScheduledExecutorService());
    registerCacheServiceIfAvailable();
    readServiceDescriptors();
}
Also used : DistributedDurableExecutorService(com.hazelcast.durableexecutor.impl.DistributedDurableExecutorService) XAService(com.hazelcast.transaction.impl.xa.XAService) SemaphoreService(com.hazelcast.concurrent.semaphore.SemaphoreService) MultiMapService(com.hazelcast.multimap.impl.MultiMapService) LockServiceImpl(com.hazelcast.concurrent.lock.LockServiceImpl) SetService(com.hazelcast.collection.impl.set.SetService) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService) QueueService(com.hazelcast.collection.impl.queue.QueueService) IdGeneratorService(com.hazelcast.concurrent.idgen.IdGeneratorService) ListService(com.hazelcast.collection.impl.list.ListService) TopicService(com.hazelcast.topic.impl.TopicService) ReliableTopicService(com.hazelcast.topic.impl.reliable.ReliableTopicService) DistributedScheduledExecutorService(com.hazelcast.scheduledexecutor.impl.DistributedScheduledExecutorService) ReliableTopicService(com.hazelcast.topic.impl.reliable.ReliableTopicService) AtomicLongService(com.hazelcast.concurrent.atomiclong.AtomicLongService) DistributedExecutorService(com.hazelcast.executor.impl.DistributedExecutorService) CountDownLatchService(com.hazelcast.concurrent.countdownlatch.CountDownLatchService) MapReduceService(com.hazelcast.mapreduce.impl.MapReduceService) RingbufferService(com.hazelcast.ringbuffer.impl.RingbufferService) MultiMapService(com.hazelcast.multimap.impl.MultiMapService) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService) MapService(com.hazelcast.map.impl.MapService) CardinalityEstimatorService(com.hazelcast.cardinality.impl.CardinalityEstimatorService) AtomicReferenceService(com.hazelcast.concurrent.atomicreference.AtomicReferenceService)

Example 2 with XAService

use of com.hazelcast.transaction.impl.xa.XAService in project hazelcast by hazelcast.

the class CollectRemoteTransactionsOperation method run.

@Override
public void run() throws Exception {
    XAService xaService = getService();
    NodeEngine nodeEngine = getNodeEngine();
    Set<SerializableXID> xids = xaService.getPreparedXids();
    List<Data> xidSet = new ArrayList<Data>();
    for (SerializableXID xid : xids) {
        xidSet.add(nodeEngine.toData(xid));
    }
    this.xidSet = new SerializableList(xidSet);
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) XAService(com.hazelcast.transaction.impl.xa.XAService) SerializableXID(com.hazelcast.transaction.impl.xa.SerializableXID) SerializableList(com.hazelcast.spi.impl.SerializableList) ArrayList(java.util.ArrayList) Data(com.hazelcast.nio.serialization.Data)

Example 3 with XAService

use of com.hazelcast.transaction.impl.xa.XAService in project hazelcast by hazelcast.

the class FinalizeRemoteTransactionBackupOperation method run.

@Override
public void run() throws Exception {
    XAService xaService = getService();
    xaService.removeTransactions(xid);
}
Also used : XAService(com.hazelcast.transaction.impl.xa.XAService)

Example 4 with XAService

use of com.hazelcast.transaction.impl.xa.XAService in project hazelcast by hazelcast.

the class PutRemoteTransactionBackupOperation method run.

@Override
public void run() throws Exception {
    XAService xaService = getService();
    NodeEngine nodeEngine = getNodeEngine();
    XATransaction transaction = new XATransaction(nodeEngine, records, txnId, xid, txOwnerUuid, timeoutMillis, startTime);
    xaService.putTransaction(transaction);
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) XAService(com.hazelcast.transaction.impl.xa.XAService) XATransaction(com.hazelcast.transaction.impl.xa.XATransaction)

Example 5 with XAService

use of com.hazelcast.transaction.impl.xa.XAService in project hazelcast by hazelcast.

the class PutRemoteTransactionOperation method run.

@Override
public void run() throws Exception {
    XAService xaService = getService();
    NodeEngine nodeEngine = getNodeEngine();
    XATransaction transaction = new XATransaction(nodeEngine, records, txnId, xid, txOwnerUuid, timeoutMillis, startTime);
    xaService.putTransaction(transaction);
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) XAService(com.hazelcast.transaction.impl.xa.XAService) XATransaction(com.hazelcast.transaction.impl.xa.XATransaction)

Aggregations

XAService (com.hazelcast.transaction.impl.xa.XAService)10 NodeEngine (com.hazelcast.spi.NodeEngine)4 XATransaction (com.hazelcast.transaction.impl.xa.XATransaction)4 CardinalityEstimatorService (com.hazelcast.cardinality.impl.CardinalityEstimatorService)1 ClientEndpoint (com.hazelcast.client.ClientEndpoint)1 ListService (com.hazelcast.collection.impl.list.ListService)1 QueueService (com.hazelcast.collection.impl.queue.QueueService)1 SetService (com.hazelcast.collection.impl.set.SetService)1 AtomicLongService (com.hazelcast.concurrent.atomiclong.AtomicLongService)1 AtomicReferenceService (com.hazelcast.concurrent.atomicreference.AtomicReferenceService)1 CountDownLatchService (com.hazelcast.concurrent.countdownlatch.CountDownLatchService)1 IdGeneratorService (com.hazelcast.concurrent.idgen.IdGeneratorService)1 LockServiceImpl (com.hazelcast.concurrent.lock.LockServiceImpl)1 SemaphoreService (com.hazelcast.concurrent.semaphore.SemaphoreService)1 ExecutionCallback (com.hazelcast.core.ExecutionCallback)1 DistributedDurableExecutorService (com.hazelcast.durableexecutor.impl.DistributedDurableExecutorService)1 DistributedExecutorService (com.hazelcast.executor.impl.DistributedExecutorService)1 MapService (com.hazelcast.map.impl.MapService)1 MapReduceService (com.hazelcast.mapreduce.impl.MapReduceService)1 MultiMapService (com.hazelcast.multimap.impl.MultiMapService)1