IGNITE - tx renaming.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/0b539033 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/0b539033 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/0b539033 Branch: refs/heads/sprint-1 Commit: 0b53903361a18f87bf1a3be7ec801f3ef48cb911 Parents: 494e6dd Author: Alexey Goncharuk <agoncha...@gridgain.com> Authored: Sun Feb 15 17:38:31 2015 -0800 Committer: Alexey Goncharuk <agoncha...@gridgain.com> Committed: Sun Feb 15 17:38:32 2015 -0800 ---------------------------------------------------------------------- .../datagrid/CacheTransactionExample.java | 6 +- .../datagrid/store/CacheStoreExample.java | 2 +- .../store/dummy/CacheDummyPersonStore.java | 8 +- .../hibernate/CacheHibernatePersonStore.java | 24 +- .../store/jdbc/CacheJdbcPersonStore.java | 14 +- .../org/apache/ignite/IgniteTransactions.java | 10 +- .../apache/ignite/cache/CacheAtomicityMode.java | 2 +- .../apache/ignite/cache/CacheProjection.java | 110 +++--- .../cache/CacheWriteSynchronizationMode.java | 4 +- .../java/org/apache/ignite/cache/GridCache.java | 10 +- .../apache/ignite/cache/store/CacheStore.java | 4 +- .../ignite/cache/store/CacheStoreSession.java | 2 +- .../store/jdbc/CacheAbstractJdbcStore.java | 2 +- .../cache/store/jdbc/CacheJdbcBlobStore.java | 14 +- .../configuration/TransactionConfiguration.java | 22 +- .../ignite/internal/IgniteTransactionsEx.java | 8 +- .../internal/processors/cache/CacheFlag.java | 2 +- .../processors/cache/GridCacheAdapter.java | 26 +- .../processors/cache/GridCacheMapEntry.java | 2 +- .../processors/cache/GridCacheProcessor.java | 2 +- .../processors/cache/GridCacheProjectionEx.java | 8 +- .../cache/GridCacheProjectionImpl.java | 10 +- .../processors/cache/GridCacheProxyImpl.java | 16 +- .../cache/GridCacheSharedContext.java | 8 +- .../processors/cache/GridCacheStoreManager.java | 4 +- .../processors/cache/GridCacheUtils.java | 12 +- .../GridDistributedCacheAdapter.java | 4 +- .../distributed/GridDistributedLockRequest.java | 8 +- .../GridDistributedTxPrepareRequest.java | 12 +- .../GridDistributedTxRemoteAdapter.java | 8 +- .../distributed/dht/GridDhtLockFuture.java | 2 +- .../distributed/dht/GridDhtLockRequest.java | 2 +- .../dht/GridDhtTransactionalCacheAdapter.java | 8 +- .../distributed/dht/GridDhtTxFinishFuture.java | 2 +- .../distributed/dht/GridDhtTxFinishRequest.java | 8 +- .../cache/distributed/dht/GridDhtTxLocal.java | 7 +- .../distributed/dht/GridDhtTxLocalAdapter.java | 10 +- .../distributed/dht/GridDhtTxPrepareFuture.java | 2 +- .../cache/distributed/dht/GridDhtTxRemote.java | 8 +- .../dht/atomic/GridDhtAtomicCache.java | 2 +- .../dht/colocated/GridDhtColocatedCache.java | 2 +- .../colocated/GridDhtColocatedLockFuture.java | 2 +- .../distributed/near/GridNearAtomicCache.java | 2 +- .../distributed/near/GridNearGetFuture.java | 2 +- .../distributed/near/GridNearLockFuture.java | 2 +- .../distributed/near/GridNearLockRequest.java | 2 +- .../near/GridNearTransactionalCache.java | 4 +- .../near/GridNearTxFinishFuture.java | 3 +- .../cache/distributed/near/GridNearTxLocal.java | 8 +- .../near/GridNearTxPrepareFuture.java | 4 +- .../distributed/near/GridNearTxRemote.java | 8 +- .../processors/cache/local/GridLocalCache.java | 2 +- .../processors/cache/local/GridLocalTx.java | 8 +- .../cache/local/GridLocalTxFuture.java | 2 +- .../local/atomic/GridLocalAtomicCache.java | 2 +- .../cache/transactions/IgniteInternalTx.java | 10 +- .../transactions/IgniteTransactionsImpl.java | 24 +- .../cache/transactions/IgniteTxAdapter.java | 70 ++-- .../cache/transactions/IgniteTxHandler.java | 6 +- .../transactions/IgniteTxLocalAdapter.java | 18 +- .../cache/transactions/IgniteTxManager.java | 30 +- .../transactions/IgniteTxMetricsAdapter.java | 119 ------- .../cache/transactions/IgniteTxProxy.java | 27 -- .../cache/transactions/IgniteTxProxyImpl.java | 345 ------------------- .../transactions/TransactionMetricsAdapter.java | 119 +++++++ .../cache/transactions/TransactionProxy.java | 27 ++ .../transactions/TransactionProxyImpl.java | 345 +++++++++++++++++++ .../dataload/GridDataLoadCacheUpdaters.java | 7 - .../datastructures/DataStructuresProcessor.java | 4 +- .../datastructures/GridCacheAtomicLongImpl.java | 4 +- .../GridCacheAtomicReferenceImpl.java | 4 +- .../GridCacheAtomicSequenceImpl.java | 4 +- .../GridCacheAtomicStampedImpl.java | 4 +- .../GridCacheCountDownLatchImpl.java | 4 +- .../GridTransactionalCacheQueueImpl.java | 4 +- .../processors/igfs/IgfsDataManager.java | 4 +- .../processors/igfs/IgfsMetaManager.java | 4 +- .../handlers/cache/GridCacheCommandHandler.java | 4 +- .../service/GridServiceProcessor.java | 4 +- .../ignite/internal/util/IgniteUtils.java | 8 +- .../cache/VisorCacheDefaultConfiguration.java | 12 +- .../node/VisorTransactionConfiguration.java | 12 +- .../apache/ignite/transactions/IgniteTx.java | 275 --------------- .../transactions/IgniteTxConcurrency.java | 45 --- .../IgniteTxHeuristicException.java | 51 --- .../ignite/transactions/IgniteTxIsolation.java | 49 --- .../ignite/transactions/IgniteTxMetrics.java | 53 --- .../IgniteTxOptimisticException.java | 47 --- .../transactions/IgniteTxRollbackException.java | 47 --- .../ignite/transactions/IgniteTxState.java | 65 ---- .../transactions/IgniteTxSynchronization.java | 45 --- .../transactions/IgniteTxTimeoutException.java | 47 --- .../apache/ignite/transactions/Transaction.java | 275 +++++++++++++++ .../transactions/TransactionConcurrency.java | 45 +++ .../TransactionHeuristicException.java | 51 +++ .../transactions/TransactionIsolation.java | 49 +++ .../ignite/transactions/TransactionMetrics.java | 53 +++ .../TransactionOptimisticException.java | 47 +++ .../TransactionRollbackException.java | 47 +++ .../ignite/transactions/TransactionState.java | 65 ++++ .../TransactionSynchronization.java | 45 +++ .../TransactionTimeoutException.java | 47 +++ .../store/jdbc/CacheJdbcPojoStoreTest.java | 8 +- ...eJdbcStoreAbstractMultithreadedSelfTest.java | 2 +- ...CacheJdbcBlobStoreMultithreadedSelfTest.java | 2 +- .../ignite/internal/GridStartStopSelfTest.java | 6 +- .../GridCacheAbstractFailoverSelfTest.java | 19 +- .../cache/GridCacheAbstractFullApiSelfTest.java | 94 ++--- .../cache/GridCacheAbstractMetricsSelfTest.java | 4 +- .../cache/GridCacheAbstractSelfTest.java | 2 +- .../cache/GridCacheAbstractTxReadTest.java | 16 +- .../cache/GridCacheBasicStoreAbstractTest.java | 10 +- .../cache/GridCacheClearLocalySelfTest.java | 2 +- .../GridCacheConcurrentTxMultiNodeTest.java | 6 +- .../GridCacheDaemonNodeAbstractSelfTest.java | 8 +- .../cache/GridCacheDeploymentSelfTest.java | 5 - .../GridCacheExAbstractFullApiSelfTest.java | 6 +- .../GridCacheFinishPartitionsSelfTest.java | 9 +- .../GridCacheInterceptorAbstractSelfTest.java | 10 +- .../GridCacheMarshallerTxAbstractTest.java | 6 +- ...GridCacheMixedPartitionExchangeSelfTest.java | 7 +- .../cache/GridCacheMultiUpdateLockSelfTest.java | 9 +- .../cache/GridCacheMvccManagerSelfTest.java | 2 +- .../cache/GridCacheNestedTxAbstractTest.java | 10 +- .../cache/GridCacheObjectToStringSelfTest.java | 6 +- ...CacheOffHeapMultiThreadedUpdateSelfTest.java | 17 +- .../GridCacheOffHeapTieredAbstractSelfTest.java | 22 +- .../cache/GridCacheOffheapUpdateSelfTest.java | 14 +- .../cache/GridCachePartitionedWritesTest.java | 2 +- .../GridCacheReferenceCleanupSelfTest.java | 4 +- .../cache/GridCacheSlowTxWarnTest.java | 3 +- .../processors/cache/GridCacheStopSelfTest.java | 2 +- .../cache/GridCacheStorePutxSelfTest.java | 3 +- .../processors/cache/GridCacheTestStore.java | 8 +- ...cheTransactionalAbstractMetricsSelfTest.java | 16 +- .../GridCacheVariableTopologySelfTest.java | 5 +- .../cache/GridCacheVersionMultinodeTest.java | 8 +- .../GridCacheWriteBehindStoreAbstractTest.java | 8 +- ...BehindStorePartitionedMultiNodeSelfTest.java | 6 +- .../IgniteCacheContainsKeyAbstractSelfTest.java | 10 +- .../cache/IgniteCacheInvokeAbstractTest.java | 16 +- .../cache/IgnitePutAllLargeBatchSelfTest.java | 6 +- ...tAllUpdateNonPreloadedPartitionSelfTest.java | 6 +- .../processors/cache/IgniteTxAbstractTest.java | 26 +- .../IgniteTxConcurrentGetAbstractTest.java | 6 +- .../IgniteTxExceptionAbstractSelfTest.java | 34 +- .../cache/IgniteTxMultiNodeAbstractTest.java | 12 +- .../IgniteTxMultiThreadedAbstractTest.java | 18 +- .../cache/IgniteTxReentryAbstractSelfTest.java | 6 +- .../IgniteTxSingleThreadedAbstractTest.java | 4 +- .../IgniteTxStoreExceptionAbstractSelfTest.java | 32 +- .../GridCacheSequenceApiSelfAbstractTest.java | 6 +- .../IgniteAtomicLongApiAbstractSelfTest.java | 2 +- ...idCachePartitionedNodeRestartTxSelfTest.java | 12 +- ...PartitionedQueueCreateMultiNodeSelfTest.java | 6 +- ...tractDistributedByteArrayValuesSelfTest.java | 10 +- .../GridCacheAbstractJobExecutionTest.java | 11 +- .../GridCacheAbstractNodeRestartSelfTest.java | 12 +- .../GridCacheAbstractPrimarySyncSelfTest.java | 6 +- .../GridCacheBasicOpAbstractTest.java | 9 +- .../GridCacheEntrySetAbstractSelfTest.java | 7 +- .../distributed/GridCacheEventAbstractTest.java | 24 +- ...dCacheMultithreadedFailoverAbstractTest.java | 2 +- .../GridCacheNodeFailureAbstractTest.java | 9 +- .../GridCacheTransformEventSelfTest.java | 14 +- .../IgniteCrossCacheTxStoreSelfTest.java | 6 +- ...iteTxConsistencyRestartAbstractSelfTest.java | 6 +- ...xOriginatingNodeFailureAbstractSelfTest.java | 4 +- ...cOriginatingNodeFailureAbstractSelfTest.java | 12 +- .../IgniteTxPreloadAbstractTest.java | 6 +- .../IgniteTxTimeoutAbstractTest.java | 12 +- ...heAbstractTransformWriteThroughSelfTest.java | 8 +- .../dht/GridCacheColocatedDebugTest.java | 32 +- ...eColocatedOptimisticTransactionSelfTest.java | 6 +- .../dht/GridCacheDhtEntrySelfTest.java | 2 +- ...dCachePartitionedTopologyChangeSelfTest.java | 13 +- .../atomic/GridCacheAtomicPreloadSelfTest.java | 8 +- .../near/GridCacheNearMultiGetSelfTest.java | 12 +- .../near/GridCacheNearMultiNodeSelfTest.java | 14 +- .../near/GridCacheNearOneNodeSelfTest.java | 10 +- ...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 2 +- .../near/GridCacheNearOnlyTopologySelfTest.java | 8 +- .../near/GridCacheNearTxMultiNodeSelfTest.java | 14 +- ...ePartitionedBasicStoreMultiNodeSelfTest.java | 6 +- .../GridCachePartitionedEvictionSelfTest.java | 8 +- ...GridCachePartitionedFilteredPutSelfTest.java | 3 +- ...achePartitionedMultiNodeCounterSelfTest.java | 12 +- ...ePartitionedMultiThreadedPutGetSelfTest.java | 8 +- .../GridCachePartitionedNodeRestartTest.java | 2 +- ...ePartitionedOptimisticTxNodeRestartTest.java | 4 +- ...achePartitionedPreloadLifecycleSelfTest.java | 4 +- .../GridCachePartitionedTxSalvageSelfTest.java | 12 +- .../GridCacheReplicatedInvalidateSelfTest.java | 10 +- ...CacheReplicatedPreloadLifecycleSelfTest.java | 4 +- ...heConcurrentEvictionConsistencySelfTest.java | 6 +- .../GridCacheConcurrentEvictionsSelfTest.java | 4 +- .../GridCacheDistributedEvictionsSelfTest.java | 4 +- .../GridCacheEmptyEntriesAbstractSelfTest.java | 10 +- .../eviction/GridCacheEvictionAbstractTest.java | 6 +- .../GridCacheEvictionTouchSelfTest.java | 7 +- .../IgniteCacheExpiryPolicyAbstractTest.java | 40 +-- ...iteCacheNoLoadPreviousValueAbstractTest.java | 10 +- .../IgniteCacheNoReadThroughAbstractTest.java | 14 +- .../IgniteCacheNoWriteThroughAbstractTest.java | 18 +- .../IgniteCacheTxStoreSessionTest.java | 32 +- .../GridCacheLocalByteArrayValuesSelfTest.java | 10 +- .../local/GridCacheLocalTxTimeoutSelfTest.java | 12 +- .../processors/igfs/IgfsSizeSelfTest.java | 8 +- .../cache/GridCacheAbstractLoadTest.java | 13 +- .../cache/GridCacheDataStructuresLoadTest.java | 5 +- .../GridCachePartitionedAtomicLongLoadTest.java | 6 +- .../ignite/loadtests/dsi/GridDsiPerfJob.java | 3 +- .../cache/GridAbstractCacheStoreSelfTest.java | 16 +- .../junits/cache/TestCacheSession.java | 6 +- .../cache/TestThreadLocalCacheSession.java | 4 +- .../GridHibernateReadWriteAccessStrategy.java | 8 +- .../hibernate/CacheHibernateBlobStore.java | 24 +- ...idCachePartitionedHitsAndMissesSelfTest.java | 5 +- .../GridCacheReplicatedQuerySelfTest.java | 4 +- .../cache/jta/GridCacheXAResource.java | 4 +- .../processors/cache/GridCacheJtaSelfTest.java | 6 +- .../websession/IgniteWebSessionFilter.java | 6 +- .../yardstick/IgniteBenchmarkArguments.java | 8 +- .../cache/IgnitePutGetTxBenchmark.java | 2 +- 224 files changed, 2161 insertions(+), 2200 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java index 6710ebc..50f1b9d 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/CacheTransactionExample.java @@ -22,8 +22,8 @@ import org.apache.ignite.transactions.*; import java.io.*; -import static org.apache.ignite.transactions.IgniteTxConcurrency.*; -import static org.apache.ignite.transactions.IgniteTxIsolation.*; +import static org.apache.ignite.transactions.TransactionConcurrency.*; +import static org.apache.ignite.transactions.TransactionIsolation.*; /** * Demonstrates how to use cache transactions. @@ -87,7 +87,7 @@ public class CacheTransactionExample { // Clone every object we get from cache, so we can freely update it. IgniteCache<Integer, Account> cache = Ignition.ignite().jcache(CACHE_NAME); - try (IgniteTx tx = Ignition.ignite().transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { + try (Transaction tx = Ignition.ignite().transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) { Account acct0 = cache.get(acctId); assert acct0 != null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java index 9499b9a..c0d0561 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/CacheStoreExample.java @@ -53,7 +53,7 @@ public class CacheStoreExample { // Clean up caches on all nodes before run. cache.clear(); - try (IgniteTx tx = ignite.transactions().txStart()) { + try (Transaction tx = ignite.transactions().txStart()) { Person val = cache.get(id); System.out.println("Read value: " + val); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java index 619966d..ab836d1 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/dummy/CacheDummyPersonStore.java @@ -45,7 +45,7 @@ public class CacheDummyPersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Override public Person load(Long key) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); System.out.println(">>> Store load [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']'); @@ -54,7 +54,7 @@ public class CacheDummyPersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Override public void write(javax.cache.Cache.Entry<? extends Long, ? extends Person> entry) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); Long key = entry.getKey(); Person val = entry.getValue(); @@ -66,7 +66,7 @@ public class CacheDummyPersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Override public void delete(Object key) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); System.out.println(">>> Store remove [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']'); @@ -101,7 +101,7 @@ public class CacheDummyPersonStore extends CacheStoreAdapter<Long, Person> { /** * @return Current transaction. */ - @Nullable private IgniteTx transaction() { + @Nullable private Transaction transaction() { CacheStoreSession ses = session(); return ses != null ? ses.transaction() : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernatePersonStore.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernatePersonStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernatePersonStore.java index 275cff5..d1cab09 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernatePersonStore.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/hibernate/CacheHibernatePersonStore.java @@ -20,7 +20,7 @@ package org.apache.ignite.examples.datagrid.store.hibernate; import org.apache.ignite.cache.store.*; import org.apache.ignite.examples.datagrid.store.*; import org.apache.ignite.lang.*; -import org.apache.ignite.transactions.*; +import org.apache.ignite.transactions.Transaction; import org.hibernate.*; import org.hibernate.cfg.*; import org.jetbrains.annotations.*; @@ -51,7 +51,7 @@ public class CacheHibernatePersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Override public Person load(Long key) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); System.out.println(">>> Store load [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']'); @@ -72,7 +72,7 @@ public class CacheHibernatePersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Override public void write(javax.cache.Cache.Entry<? extends Long, ? extends Person> entry) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); Long key = entry.getKey(); @@ -104,7 +104,7 @@ public class CacheHibernatePersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @SuppressWarnings({"JpaQueryApiInspection"}) @Override public void delete(Object key) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); System.out.println(">>> Store remove [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']'); @@ -166,11 +166,11 @@ public class CacheHibernatePersonStore extends CacheStoreAdapter<Long, Person> { * @param ses Hibernate session. * @param tx Cache ongoing transaction. */ - private void rollback(Session ses, IgniteTx tx) { + private void rollback(Session ses, Transaction tx) { // Rollback only if there is no cache transaction, // otherwise txEnd() will do all required work. if (tx == null) { - Transaction hTx = ses.getTransaction(); + org.hibernate.Transaction hTx = ses.getTransaction(); if (hTx != null && hTx.isActive()) hTx.rollback(); @@ -183,11 +183,11 @@ public class CacheHibernatePersonStore extends CacheStoreAdapter<Long, Person> { * @param ses Hibernate session. * @param tx Cache ongoing transaction. */ - private void end(Session ses, @Nullable IgniteTx tx) { + private void end(Session ses, @Nullable Transaction tx) { // Commit only if there is no cache transaction, // otherwise txEnd() will do all required work. if (tx == null) { - Transaction hTx = ses.getTransaction(); + org.hibernate.Transaction hTx = ses.getTransaction(); if (hTx != null && hTx.isActive()) hTx.commit(); @@ -200,14 +200,14 @@ public class CacheHibernatePersonStore extends CacheStoreAdapter<Long, Person> { @Override public void txEnd(boolean commit) { CacheStoreSession storeSes = session(); - IgniteTx tx = storeSes.transaction(); + Transaction tx = storeSes.transaction(); Map<String, Session> props = storeSes.properties(); Session ses = props.remove(ATTR_SES); if (ses != null) { - Transaction hTx = ses.getTransaction(); + org.hibernate.Transaction hTx = ses.getTransaction(); if (hTx != null) { try { @@ -238,7 +238,7 @@ public class CacheHibernatePersonStore extends CacheStoreAdapter<Long, Person> { * @param tx Cache transaction. * @return Session. */ - private Session session(@Nullable IgniteTx tx) { + private Session session(@Nullable Transaction tx) { Session ses; if (tx != null) { @@ -270,7 +270,7 @@ public class CacheHibernatePersonStore extends CacheStoreAdapter<Long, Person> { /** * @return Current transaction. */ - @Nullable private IgniteTx transaction() { + @Nullable private Transaction transaction() { CacheStoreSession ses = session(); return ses != null ? ses.transaction() : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java ---------------------------------------------------------------------- diff --git a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java index 0a7cfd1..d17fc87 100644 --- a/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java +++ b/examples/src/main/java/org/apache/ignite/examples/datagrid/store/jdbc/CacheJdbcPersonStore.java @@ -67,7 +67,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Override public void txEnd(boolean commit) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); Map<String, Connection> props = session().properties(); @@ -88,7 +88,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Nullable @Override public Person load(Long key) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); System.out.println(">>> Store load [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']'); @@ -118,7 +118,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Override public void write(Cache.Entry<? extends Long, ? extends Person> entry) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); Long key = entry.getKey(); @@ -164,7 +164,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> { /** {@inheritDoc} */ @Override public void delete(Object key) { - IgniteTx tx = transaction(); + Transaction tx = transaction(); System.out.println(">>> Store remove [key=" + key + ", xid=" + (tx == null ? null : tx.xid()) + ']'); @@ -228,7 +228,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> { * @return Connection. * @throws SQLException In case of error. */ - private Connection connection(@Nullable IgniteTx tx) throws SQLException { + private Connection connection(@Nullable Transaction tx) throws SQLException { if (tx != null) { Map<Object, Object> props = session().properties(); @@ -255,7 +255,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> { * @param tx Active transaction, if any. * @param conn Allocated connection. */ - private void end(@Nullable IgniteTx tx, @Nullable Connection conn) { + private void end(@Nullable Transaction tx, @Nullable Connection conn) { if (tx == null && conn != null) { // Close connection right away if there is no transaction. try { @@ -297,7 +297,7 @@ public class CacheJdbcPersonStore extends CacheStoreAdapter<Long, Person> { /** * @return Current transaction. */ - @Nullable private IgniteTx transaction() { + @Nullable private Transaction transaction() { CacheStoreSession ses = session(); return ses != null ? ses.transaction() : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java b/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java index 5277381..a78d55c 100644 --- a/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java +++ b/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java @@ -33,7 +33,7 @@ public interface IgniteTransactions { * @throws IllegalStateException If transaction is already started by this thread. * @throws UnsupportedOperationException If cache is {@link CacheAtomicityMode#ATOMIC}. */ - public IgniteTx txStart() throws IllegalStateException; + public Transaction txStart() throws IllegalStateException; /** * Starts new transaction with the specified concurrency and isolation. @@ -44,7 +44,7 @@ public interface IgniteTransactions { * @throws IllegalStateException If transaction is already started by this thread. * @throws UnsupportedOperationException If cache is {@link CacheAtomicityMode#ATOMIC}. */ - public IgniteTx txStart(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation); + public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation); /** * Starts transaction with specified isolation, concurrency, timeout, invalidation flag, @@ -58,7 +58,7 @@ public interface IgniteTransactions { * @throws IllegalStateException If transaction is already started by this thread. * @throws UnsupportedOperationException If cache is {@link CacheAtomicityMode#ATOMIC}. */ - public IgniteTx txStart(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation, long timeout, + public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, int txSize); /** @@ -68,12 +68,12 @@ public interface IgniteTransactions { * @return Transaction started by this thread or {@code null} if this thread * does not have a transaction. */ - public IgniteTx tx(); + public Transaction tx(); /** * @return Transaction metrics. */ - public IgniteTxMetrics metrics(); + public TransactionMetrics metrics(); /** * Resets transaction metrics. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java index f81ebbf..5b3cfd4 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheAtomicityMode.java @@ -32,7 +32,7 @@ import org.jetbrains.annotations.*; public enum CacheAtomicityMode { /** * Specified fully {@code ACID}-compliant transactional cache behavior. See - * {@link IgniteTx} for more information about transactions. + * {@link Transaction} for more information about transactions. * <p> * This mode is currently the default cache atomicity mode. However, cache * atomicity mode will be changed to {@link #ATOMIC} starting from version {@code 5.2}, http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java index 31616b1..e26add4 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java @@ -97,7 +97,7 @@ import java.util.concurrent.*; * </li> * <li> * Various {@code 'txStart(..)'} methods to perform various cache - * operations within a transaction (see {@link IgniteTx} for more information). + * operations within a transaction (see {@link Transaction} for more information). * </li> * <li> * {@link #queries()} method to get an instance of {@link CacheQueries} service for working @@ -126,7 +126,7 @@ import java.util.concurrent.*; * and {@code 'remove(..)'} operations are transactional and will participate in an ongoing transaction, * if any. Other methods like {@code 'peek(..)'} or various {@code 'contains(..)'} methods may * be transaction-aware, i.e. check in-transaction entries first, but will not affect the current - * state of transaction. See {@link IgniteTx} documentation for more information + * state of transaction. See {@link Transaction} documentation for more information * about transactions. * <h1 class="header">Group Locking</h1> * <i>Group Locking</i> is a feature where instead of acquiring individual locks, Ignite will lock @@ -137,13 +137,13 @@ import java.util.concurrent.*; * only keys with identical affinity-key (see {@link org.apache.ignite.cache.affinity.CacheAffinityKeyMapped}) can participate in the * transaction, and only one lock on the <i>affinity-key</i> will be acquired for the whole transaction. * {@code Affinity-group-locked} transactions are started via - * {@link #txStartAffinity(Object, IgniteTxConcurrency, IgniteTxIsolation, long, int)} method. + * {@link #txStartAffinity(Object, TransactionConcurrency, TransactionIsolation, long, int)} method. * <p> * With {@code partition-based-group-locking} the keys are grouped by partition ID. This means that * only keys belonging to identical partition (see {@link org.apache.ignite.cache.affinity.CacheAffinity#partition(Object)}) can participate in the * transaction, and only one lock on the whole partition will be acquired for the whole transaction. * {@code Partition-group-locked} transactions are started via - * {@link #txStartPartition(int, IgniteTxConcurrency, IgniteTxIsolation, long, int)} method. + * {@link #txStartPartition(int, TransactionConcurrency, TransactionIsolation, long, int)} method. * <p> * <i>Group locking</i> should always be used for transactions whenever possible. If your requirements fit either * <i>affinity-based</i> or <i>partition-based</i> scenarios outlined above then <i>group-locking</i> @@ -395,7 +395,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { /** * Reloads a single key from persistent storage. This method - * delegates to {@link CacheStore#load(IgniteTx, Object)} + * delegates to {@link CacheStore#load(Transaction, Object)} * method. * <h2 class="header">Transactions</h2> * This method does not participate in transactions, however it does not violate @@ -409,7 +409,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { /** * Asynchronously reloads a single key from persistent storage. This method - * delegates to {@link CacheStore#load(IgniteTx, Object)} + * delegates to {@link CacheStore#load(Transaction, Object)} * method. * <h2 class="header">Transactions</h2> * This method does not participate in transactions, however it does not violate @@ -527,7 +527,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * If the value is not present in cache, then it will be looked up from swap storage. If * it's not present in swap, or if swap is disable, and if read-through is allowed, value * will be loaded from {@link CacheStore} persistent storage via - * {@link CacheStore#load(IgniteTx, Object)} method. + * {@link CacheStore#load(Transaction, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -552,7 +552,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * If the value is not present in cache, then it will be looked up from swap storage. If * it's not present in swap, or if swap is disabled, and if read-through is allowed, value * will be loaded from {@link CacheStore} persistent storage via - * {@link CacheStore#load(IgniteTx, Object)} method. + * {@link CacheStore#load(Transaction, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -576,7 +576,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * If some value is not present in cache, then it will be looked up from swap storage. If * it's not present in swap, or if swap is disabled, and if read-through is allowed, value * will be loaded from {@link CacheStore} persistent storage via - * {@link CacheStore#loadAll(IgniteTx, Collection, org.apache.ignite.lang.IgniteBiInClosure)} method. + * {@link CacheStore#loadAll(Transaction, Collection, org.apache.ignite.lang.IgniteBiInClosure)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -600,7 +600,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * If some value is not present in cache, then it will be looked up from swap storage. If * it's not present in swap, or if swap is disabled, and if read-through is allowed, value * will be loaded from {@link CacheStore} persistent storage via - * {@link CacheStore#loadAll(IgniteTx, Collection, org.apache.ignite.lang.IgniteBiInClosure)} method. + * {@link CacheStore#loadAll(Transaction, Collection, org.apache.ignite.lang.IgniteBiInClosure)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -622,13 +622,13 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * the value will be loaded from the primary node, which in its turn may load the value * from the swap storage, and consecutively, if it's not in swap, * from the underlying persistent storage. If value has to be loaded from persistent - * storage, {@link CacheStore#load(IgniteTx, Object)} method will be used. + * storage, {@link CacheStore#load(Transaction, Object)} method will be used. * <p> * If the returned value is not needed, method {@link #putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} should * always be used instead of this one to avoid the overhead associated with returning of the previous value. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -661,13 +661,13 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * the value will be loaded from the primary node, which in its turn may load the value * from the swap storage, and consecutively, if it's not in swap and read-through is allowed, * from the underlying persistent storage. If value has to be loaded from persistent - * storage, {@link CacheStore#load(IgniteTx, Object)} method will be used. + * storage, {@link CacheStore#load(Transaction, Object)} method will be used. * <p> * If the returned value is not needed, method {@link #putx(Object, Object, org.apache.ignite.lang.IgnitePredicate[])} should * always be used instead of this one to avoid the overhead associated with returning of the previous value. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -696,7 +696,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * should be used whenever return value is not required. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -729,7 +729,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * should always be used whenever return value is not required. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -756,14 +756,14 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * the value will be loaded from the primary node, which in its turn may load the value * from the swap storage, and consecutively, if it's not in swap, * from the underlying persistent storage. If value has to be loaded from persistent - * storage, {@link CacheStore#load(IgniteTx, Object)} method will be used. + * storage, {@link CacheStore#load(Transaction, Object)} method will be used. * <p> * If the returned value is not needed, method {@link #putxIfAbsent(Object, Object)} should * always be used instead of this one to avoid the overhead associated with returning of the * previous value. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -787,14 +787,14 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * the value will be loaded from the primary node, which in its turn may load the value * from the swap storage, and consecutively, if it's not in swap, * from the underlying persistent storage. If value has to be loaded from persistent - * storage, {@link CacheStore#load(IgniteTx, Object)} method will be used. + * storage, {@link CacheStore#load(Transaction, Object)} method will be used. * <p> * If the returned value is not needed, method {@link #putxIfAbsentAsync(Object, Object)} should * always be used instead of this one to avoid the overhead associated with returning of the * previous value. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -820,7 +820,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * should always be used whenever return value is not required. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -846,7 +846,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * should always be used whenever return value is not required. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -868,14 +868,14 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * the value will be loaded from the primary node, which in its turn may load the value * from the swap storage, and consecutively, if it's not in swap, * from the underlying persistent storage. If value has to be loaded from persistent - * storage, {@link CacheStore#load(IgniteTx, Object)} method will be used. + * storage, {@link CacheStore#load(Transaction, Object)} method will be used. * <p> * If the returned value is not needed, method {@link #replacex(Object, Object)} should * always be used instead of this one to avoid the overhead associated with returning of the * previous value. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -898,14 +898,14 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * {@link CacheMode#PARTITIONED} caches, the value will be loaded from the primary node, * which in its turn may load the value from the swap storage, and consecutively, if it's not in swap, * from the underlying persistent storage. If value has to be loaded from persistent - * storage, {@link CacheStore#load(IgniteTx, Object)} method will be used. + * storage, {@link CacheStore#load(Transaction, Object)} method will be used. * <p> * If the returned value is not needed, method {@link #replacex(Object, Object)} should * always be used instead of this one to avoid the overhead associated with returning of the * previous value. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -930,7 +930,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * should always be used whenever return value is not required. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -956,7 +956,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * should always be used whenever return value is not required. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -979,7 +979,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * This method will return {@code true} if value is stored in cache and {@code false} otherwise. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1004,7 +1004,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * This method will return {@code true} if value is stored in cache and {@code false} otherwise. * <p> * If write-through is enabled, the stored value will be persisted to {@link CacheStore} - * via {@link CacheStore#put(IgniteTx, Object, Object)} method. + * via {@link CacheStore#put(Transaction, Object, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1027,7 +1027,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * so value stored in cache is guaranteed to be consistent with the filters. * <p> * If write-through is enabled, the stored values will be persisted to {@link CacheStore} - * via {@link CacheStore#putAll(IgniteTx, Map)} method. + * via {@link CacheStore#putAll(Transaction, Map)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1050,7 +1050,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * so value stored in cache is guaranteed to be consistent with the filters. * <p> * If write-through is enabled, the stored values will be persisted to {@link CacheStore} - * via {@link CacheStore#putAll(IgniteTx, Map)} method. + * via {@link CacheStore#putAll(Transaction, Map)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1196,7 +1196,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * @throws IllegalStateException If transaction is already started by this thread. * @throws UnsupportedOperationException If cache is {@link CacheAtomicityMode#ATOMIC}. */ - public IgniteTx txStart() throws IllegalStateException; + public Transaction txStart() throws IllegalStateException; /** * Starts new transaction with the specified concurrency and isolation. @@ -1207,14 +1207,14 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * @throws IllegalStateException If transaction is already started by this thread. * @throws UnsupportedOperationException If cache is {@link CacheAtomicityMode#ATOMIC}. */ - public IgniteTx txStart(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation); + public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation); /** * @param concurrency Concurrency. * @param isolation Isolation. * @return New transaction. */ - public IgniteInternalTx txStartEx(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation); + public IgniteInternalTx txStartEx(TransactionConcurrency concurrency, TransactionIsolation isolation); /** * Starts transaction with specified isolation, concurrency, timeout, invalidation flag, @@ -1228,7 +1228,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * @throws IllegalStateException If transaction is already started by this thread. * @throws UnsupportedOperationException If cache is {@link CacheAtomicityMode#ATOMIC}. */ - public IgniteTx txStart(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation, long timeout, + public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, int txSize); /** @@ -1238,7 +1238,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * @return Transaction started by this thread or {@code null} if this thread * does not have a transaction. */ - @Nullable public IgniteTx tx(); + @Nullable public Transaction tx(); /** * Gets entry from cache with the specified key. The returned entry can @@ -1394,14 +1394,14 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * caches, the value will be loaded from the primary node, which in its turn may load the value * from the disk-based swap storage, and consecutively, if it's not in swap, * from the underlying persistent storage. If value has to be loaded from persistent - * storage, {@link CacheStore#load(IgniteTx, Object)} method will be used. + * storage, {@link CacheStore#load(Transaction, Object)} method will be used. * <p> * If the returned value is not needed, method {@link #removex(Object, org.apache.ignite.lang.IgnitePredicate[])} should * always be used instead of this one to avoid the overhead associated with returning of the * previous value. * <p> * If write-through is enabled, the value will be removed from {@link CacheStore} - * via {@link CacheStore#remove(IgniteTx, Object)} method. + * via {@link CacheStore#remove(Transaction, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1427,14 +1427,14 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * caches, the value will be loaded from the primary node, which in its turn may load the value * from the swap storage, and consecutively, if it's not in swap, * from the underlying persistent storage. If value has to be loaded from persistent - * storage, {@link CacheStore#load(IgniteTx, Object)} method will be used. + * storage, {@link CacheStore#load(Transaction, Object)} method will be used. * <p> * If the returned value is not needed, method {@link #removex(Object, org.apache.ignite.lang.IgnitePredicate[])} should * always be used instead of this one to avoid the overhead associated with returning of the * previous value. * <p> * If write-through is enabled, the value will be removed from {@link CacheStore} - * via {@link CacheStore#remove(IgniteTx, Object)} method. + * via {@link CacheStore#remove(Transaction, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1458,7 +1458,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * provided filters have passed and there was something to remove, {@code false} otherwise. * <p> * If write-through is enabled, the value will be removed from {@link CacheStore} - * via {@link CacheStore#remove(IgniteTx, Object)} method. + * via {@link CacheStore#remove(Transaction, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1485,7 +1485,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * provided filters have passed and there was something to remove, {@code false} otherwise. * <p> * If write-through is enabled, the value will be removed from {@link CacheStore} - * via {@link CacheStore#remove(IgniteTx, Object)} method. + * via {@link CacheStore#remove(Transaction, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1509,7 +1509,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * Removes given key mapping from cache if one exists and value is equal to the passed in value. * <p> * If write-through is enabled, the value will be removed from {@link CacheStore} - * via {@link CacheStore#remove(IgniteTx, Object)} method. + * via {@link CacheStore#remove(Transaction, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1534,7 +1534,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * provided filters have passed and there was something to remove, {@code false} otherwise. * <p> * If write-through is enabled, the value will be removed from {@link CacheStore} - * via {@link CacheStore#remove(IgniteTx, Object)} method. + * via {@link CacheStore#remove(Transaction, Object)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1556,7 +1556,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * pass. * <p> * If write-through is enabled, the values will be removed from {@link CacheStore} - * via {@link CacheStore#removeAll(IgniteTx, Collection)} method. + * via {@link CacheStore#removeAll(Transaction, Collection)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1578,7 +1578,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * passed in filters do pass. * <p> * If write-through is enabled, the values will be removed from {@link CacheStore} - * via {@link CacheStore#removeAll(IgniteTx, Collection)} method. + * via {@link CacheStore#removeAll(Transaction, Collection)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1607,7 +1607,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * other concurrent transactional updates. * <p> * If write-through is enabled, the values will be removed from {@link CacheStore} - * via {@link CacheStore#removeAll(IgniteTx, Collection)} method. + * via {@link CacheStore#removeAll(Transaction, Collection)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1634,7 +1634,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * is empty, then transaction will quickly become very heavy and slow. * <p> * If write-through is enabled, the values will be removed from {@link CacheStore} - * via {@link CacheStore#removeAll(IgniteTx, Collection)} method. + * via {@link CacheStore#removeAll(Transaction, Collection)} method. * <h2 class="header">Transactions</h2> * This method is transactional and will enlist the entry into ongoing transaction * if there is one. @@ -1657,7 +1657,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * <h2 class="header">Transactions</h2> * Locks are not transactional and should not be used from within transactions. If you do * need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction + * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction * which will acquire explicit locks for relevant cache operations. * <h2 class="header">Cache Flags</h2> * This method is not available if any of the following flags are set on projection: @@ -1683,7 +1683,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * <h2 class="header">Transactions</h2> * Locks are not transactional and should not be used from within transactions. If you do * need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction + * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction * which will acquire explicit locks for relevant cache operations. * <h2 class="header">Cache Flags</h2> * This method is not available if any of the following flags are set on projection: @@ -1709,7 +1709,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * <h2 class="header">Transactions</h2> * Locks are not transactional and should not be used from within transactions. If you do * need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction + * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction * which will acquire explicit locks for relevant cache operations. * <h2 class="header">Cache Flags</h2> * This method is not available if any of the following flags are set on projection: @@ -1735,7 +1735,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * <h2 class="header">Transactions</h2> * Locks are not transactional and should not be used from within transactions. If you do * need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction + * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction * which will acquire explicit locks for relevant cache operations. * <h2 class="header">Cache Flags</h2> * This method is not available if any of the following flags are set on projection: @@ -1761,7 +1761,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * <h2 class="header">Transactions</h2> * Locks are not transactional and should not be used from within transactions. If you do * need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction + * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction * which will acquire explicit locks for relevant cache operations. * <h2 class="header">Cache Flags</h2> * This method is not available if any of the following flags are set on projection: @@ -1782,7 +1782,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K, V>> { * <h2 class="header">Transactions</h2> * Locks are not transactional and should not be used from within transactions. If you do * need explicit locking within transaction, then you should use - * {@link IgniteTxConcurrency#PESSIMISTIC} concurrency control for transaction + * {@link TransactionConcurrency#PESSIMISTIC} concurrency control for transaction * which will acquire explicit locks for relevant cache operations. * <h2 class="header">Cache Flags</h2> * This method is not available if any of the following flags are set on projection: http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java index e348b50..d44e65e 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheWriteSynchronizationMode.java @@ -24,7 +24,7 @@ import org.jetbrains.annotations.*; * Mode indicating how Ignite should wait for write replies from other nodes. Default * value is {@link #FULL_ASYNC}}, which means that Ignite will not wait for responses from * participating nodes. This means that by default remote nodes may get their state updated slightly after - * any of the cache write methods complete, or after {@link IgniteTx#commit()} method completes. + * any of the cache write methods complete, or after {@link Transaction#commit()} method completes. * <p> * Note that regardless of write synchronization mode, cache data will always remain fully * consistent across all participating nodes. @@ -43,7 +43,7 @@ public enum CacheWriteSynchronizationMode { /** * Flag indicating that Ignite will not wait for write or commit responses from participating nodes, * which means that remote nodes may get their state updated a bit after any of the cache write methods - * complete, or after {@link IgniteTx#commit()} method completes. + * complete, or after {@link Transaction#commit()} method completes. */ FULL_ASYNC, http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java b/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java index d84f1d6..d57e5e5 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/GridCache.java @@ -73,23 +73,23 @@ public interface GridCache<K, V> extends CacheProjection<K, V> { * * @param syncs Transaction synchronizations to register. */ - public void txSynchronize(@Nullable IgniteTxSynchronization syncs); + public void txSynchronize(@Nullable TransactionSynchronization syncs); /** * Removes transaction synchronizations. * * @param syncs Transactions synchronizations to remove. - * @see #txSynchronize(IgniteTxSynchronization) + * @see #txSynchronize(TransactionSynchronization) */ - public void txUnsynchronize(@Nullable IgniteTxSynchronization syncs); + public void txUnsynchronize(@Nullable TransactionSynchronization syncs); /** * Gets registered transaction synchronizations. * * @return Registered transaction synchronizations. - * @see #txSynchronize(IgniteTxSynchronization) + * @see #txSynchronize(TransactionSynchronization) */ - public Collection<IgniteTxSynchronization> txSynchronizations(); + public Collection<TransactionSynchronization> txSynchronizations(); /** * Gets affinity service to provide information about data partitioning http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java index 114b56e..3565f09 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStore.java @@ -52,7 +52,7 @@ import static javax.cache.Cache.*; * <li>{@link CacheJdbcBlobStore}</li> * </ul> * <p> - * All transactional operations of this API are provided with ongoing {@link IgniteTx}, + * All transactional operations of this API are provided with ongoing {@link Transaction}, * if any. You can attach any metadata to it, e.g. to recognize if several operations belong * to the same transaction or not. * Here is an example of how attach a JDBC connection as transaction metadata: @@ -152,7 +152,7 @@ public abstract class CacheStore<K, V> implements CacheLoader<K, V>, CacheWriter * * @param commit {@code True} if transaction should commit, {@code false} for rollback. * @throws CacheWriterException If commit or rollback failed. Note that commit failure in some cases - * may bring cache transaction into {@link IgniteTxState#UNKNOWN} which will + * may bring cache transaction into {@link TransactionState#UNKNOWN} which will * consequently cause all transacted entries to be invalidated. */ public abstract void txEnd(boolean commit) throws CacheWriterException; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java index d88f1a9..ce63c6a 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/store/CacheStoreSession.java @@ -29,7 +29,7 @@ public interface CacheStoreSession { /** * @return Transaction belonging to current session. */ - @Nullable public IgniteTx transaction(); + @Nullable public Transaction transaction(); /** * @return Current session properties. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java index ae2643c..31ee5b5 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java @@ -296,7 +296,7 @@ public abstract class CacheAbstractJdbcStore<K, V> extends CacheStore<K, V> impl @Override public void txEnd(boolean commit) throws CacheWriterException { CacheStoreSession ses = session(); - IgniteTx tx = ses.transaction(); + Transaction tx = ses.transaction(); Connection conn = ses.<String, Connection>properties().remove(ATTR_CONN_PROP); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java index df98c0b..3b247be 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcBlobStore.java @@ -177,7 +177,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K, V> { @Override public void txEnd(boolean commit) { init(); - IgniteTx tx = transaction(); + Transaction tx = transaction(); Map<String, Connection> props = session().properties(); @@ -207,7 +207,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K, V> { @Override public V load(K key) { init(); - IgniteTx tx = transaction(); + Transaction tx = transaction(); if (log.isDebugEnabled()) log.debug("Store load [key=" + key + ", tx=" + tx + ']'); @@ -242,7 +242,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K, V> { @Override public void write(Cache.Entry<? extends K, ? extends V> entry) { init(); - IgniteTx tx = transaction(); + Transaction tx = transaction(); K key = entry.getKey(); V val = entry.getValue(); @@ -285,7 +285,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K, V> { @Override public void delete(Object key) { init(); - IgniteTx tx = transaction(); + Transaction tx = transaction(); if (log.isDebugEnabled()) log.debug("Store remove [key=" + key + ", tx=" + tx + ']'); @@ -316,7 +316,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K, V> { * @return Connection. * @throws SQLException In case of error. */ - private Connection connection(@Nullable IgniteTx tx) throws SQLException { + private Connection connection(@Nullable Transaction tx) throws SQLException { if (tx != null) { Map<String, Connection> props = session().properties(); @@ -344,7 +344,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K, V> { * @param conn Allocated connection. * @param st Created statement, */ - private void end(@Nullable IgniteTx tx, Connection conn, Statement st) { + private void end(@Nullable Transaction tx, Connection conn, Statement st) { U.closeQuiet(st); if (tx == null) @@ -577,7 +577,7 @@ public class CacheJdbcBlobStore<K, V> extends CacheStoreAdapter<K, V> { /** * @return Current transaction. */ - @Nullable private IgniteTx transaction() { + @Nullable private Transaction transaction() { CacheStoreSession ses = session(); return ses != null ? ses.transaction() : null; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java index 13ac061..9a4114b 100644 --- a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java +++ b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java @@ -32,10 +32,10 @@ public class TransactionConfiguration implements Serializable { public static final boolean DFLT_TX_SERIALIZABLE_ENABLED = false; /** Default concurrency mode. */ - public static final IgniteTxConcurrency DFLT_TX_CONCURRENCY = IgniteTxConcurrency.PESSIMISTIC; + public static final TransactionConcurrency DFLT_TX_CONCURRENCY = TransactionConcurrency.PESSIMISTIC; /** Default transaction isolation level. */ - public static final IgniteTxIsolation DFLT_TX_ISOLATION = IgniteTxIsolation.REPEATABLE_READ; + public static final TransactionIsolation DFLT_TX_ISOLATION = TransactionIsolation.REPEATABLE_READ; /** Default transaction timeout. */ public static final long DFLT_TRANSACTION_TIMEOUT = 0; @@ -47,10 +47,10 @@ public class TransactionConfiguration implements Serializable { private boolean txSerEnabled = DFLT_TX_SERIALIZABLE_ENABLED; /** Transaction isolation. */ - private IgniteTxIsolation dfltIsolation = DFLT_TX_ISOLATION; + private TransactionIsolation dfltIsolation = DFLT_TX_ISOLATION; /** Cache concurrency. */ - private IgniteTxConcurrency dfltConcurrency = DFLT_TX_CONCURRENCY; + private TransactionConcurrency dfltConcurrency = DFLT_TX_CONCURRENCY; /** Default transaction timeout. */ private long dfltTxTimeout = DFLT_TRANSACTION_TIMEOUT; @@ -81,7 +81,7 @@ public class TransactionConfiguration implements Serializable { } /** - * Gets flag to enable/disable {@link IgniteTxIsolation#SERIALIZABLE} isolation + * Gets flag to enable/disable {@link TransactionIsolation#SERIALIZABLE} isolation * level for cache transactions. Serializable level does carry certain overhead and * if not used, should be disabled. Default value is {@code false}. * @@ -105,9 +105,9 @@ public class TransactionConfiguration implements Serializable { * specified. Default value is defined by {@link #DFLT_TX_CONCURRENCY}. * * @return Default cache transaction concurrency. - * @see IgniteTx + * @see Transaction */ - public IgniteTxConcurrency getDefaultTxConcurrency() { + public TransactionConcurrency getDefaultTxConcurrency() { return dfltConcurrency; } @@ -116,7 +116,7 @@ public class TransactionConfiguration implements Serializable { * * @param dfltConcurrency Default cache transaction concurrency. */ - public void setDefaultTxConcurrency(IgniteTxConcurrency dfltConcurrency) { + public void setDefaultTxConcurrency(TransactionConcurrency dfltConcurrency) { this.dfltConcurrency = dfltConcurrency; } @@ -125,9 +125,9 @@ public class TransactionConfiguration implements Serializable { * specified. Default value is defined by {@link #DFLT_TX_ISOLATION}. * * @return Default cache transaction isolation. - * @see IgniteTx + * @see Transaction */ - public IgniteTxIsolation getDefaultTxIsolation() { + public TransactionIsolation getDefaultTxIsolation() { return dfltIsolation; } @@ -136,7 +136,7 @@ public class TransactionConfiguration implements Serializable { * * @param dfltIsolation Default cache transaction isolation. */ - public void setDefaultTxIsolation(IgniteTxIsolation dfltIsolation) { + public void setDefaultTxIsolation(TransactionIsolation dfltIsolation) { this.dfltIsolation = dfltIsolation; } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/internal/IgniteTransactionsEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteTransactionsEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteTransactionsEx.java index 82852a9..3ba0bdb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteTransactionsEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteTransactionsEx.java @@ -39,7 +39,7 @@ public interface IgniteTransactionsEx extends IgniteTransactions { * @throws IllegalStateException If transaction is already started by this thread. * @throws UnsupportedOperationException If cache is {@link CacheAtomicityMode#ATOMIC}. */ - public IgniteTx txStartSystem(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation, long timeout, + public Transaction txStartSystem(TransactionConcurrency concurrency, TransactionIsolation isolation, long timeout, int txSize); /** @@ -51,8 +51,8 @@ public interface IgniteTransactionsEx extends IgniteTransactions { * @return New transaction. */ public IgniteInternalTx txStartEx(GridCacheContext ctx, - IgniteTxConcurrency concurrency, - IgniteTxIsolation isolation, + TransactionConcurrency concurrency, + TransactionIsolation isolation, long timeout, int txSize); @@ -62,5 +62,5 @@ public interface IgniteTransactionsEx extends IgniteTransactions { * @param isolation Isolation. * @return New transaction. */ - public IgniteInternalTx txStartEx(GridCacheContext ctx, IgniteTxConcurrency concurrency, IgniteTxIsolation isolation); + public IgniteInternalTx txStartEx(GridCacheContext ctx, TransactionConcurrency concurrency, TransactionIsolation isolation); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java index 3612b4a..947d5df 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheFlag.java @@ -78,7 +78,7 @@ public enum CacheFlag { * Instead of updating remote entries with new values, small invalidation * messages will be sent to set the values to {@code null}. * - * @see IgniteTx#isInvalidate() + * @see Transaction#isInvalidate() * @see org.apache.ignite.configuration.CacheConfiguration#isInvalidate() */ INVALIDATE, http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index 7b426cb..dbe518a 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -66,8 +66,8 @@ import static org.apache.ignite.internal.processors.cache.CacheFlag.*; import static org.apache.ignite.internal.processors.cache.GridCachePeekMode.*; import static org.apache.ignite.internal.processors.dr.GridDrType.*; import static org.apache.ignite.internal.processors.task.GridTaskThreadContextKey.*; -import static org.apache.ignite.transactions.IgniteTxConcurrency.*; -import static org.apache.ignite.transactions.IgniteTxIsolation.*; +import static org.apache.ignite.transactions.TransactionConcurrency.*; +import static org.apache.ignite.transactions.TransactionIsolation.*; /** * Adapter for different cache implementations. @@ -560,7 +560,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, IgniteTxLocalEx<K, V> tx, boolean isRead, boolean retval, - IgniteTxIsolation isolation, + TransactionIsolation isolation, boolean invalidate, long accessTtl, IgnitePredicate<Cache.Entry<K, V>>[] filter); @@ -3632,10 +3632,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Nullable @Override public IgniteTx tx() { + @Nullable @Override public Transaction tx() { IgniteTxAdapter<K, V> tx = ctx.tm().threadLocalTx(); - return tx == null ? null : new IgniteTxProxyImpl<>(tx, ctx.shared(), false); + return tx == null ? null : new TransactionProxyImpl<>(tx, ctx.shared(), false); } /** {@inheritDoc} */ @@ -3745,14 +3745,14 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public IgniteTx txStart() throws IllegalStateException { + @Override public Transaction txStart() throws IllegalStateException { TransactionConfiguration cfg = ctx.gridConfig().getTransactionConfiguration(); return txStart(cfg.getDefaultTxConcurrency(), cfg.getDefaultTxIsolation()); } /** {@inheritDoc} */ - @Override public IgniteTx txStart(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation) { + @Override public Transaction txStart(TransactionConcurrency concurrency, TransactionIsolation isolation) { A.notNull(concurrency, "concurrency"); A.notNull(isolation, "isolation"); @@ -3767,15 +3767,15 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public IgniteInternalTx txStartEx(IgniteTxConcurrency concurrency, IgniteTxIsolation isolation) { + @Override public IgniteInternalTx txStartEx(TransactionConcurrency concurrency, TransactionIsolation isolation) { IgniteTransactionsEx txs = ctx.kernalContext().cache().transactions(); return txs.txStartEx(ctx, concurrency, isolation); } /** {@inheritDoc} */ - @Override public IgniteTx txStart(IgniteTxConcurrency concurrency, - IgniteTxIsolation isolation, long timeout, int txSize) throws IllegalStateException { + @Override public Transaction txStart(TransactionConcurrency concurrency, + TransactionIsolation isolation, long timeout, int txSize) throws IllegalStateException { IgniteTransactionsEx txs = ctx.kernalContext().cache().transactions(); return ctx.system() ? @@ -3803,17 +3803,17 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public void txSynchronize(IgniteTxSynchronization syncs) { + @Override public void txSynchronize(TransactionSynchronization syncs) { ctx.tm().addSynchronizations(syncs); } /** {@inheritDoc} */ - @Override public void txUnsynchronize(IgniteTxSynchronization syncs) { + @Override public void txUnsynchronize(TransactionSynchronization syncs) { ctx.tm().removeSynchronizations(syncs); } /** {@inheritDoc} */ - @Override public Collection<IgniteTxSynchronization> txSynchronizations() { + @Override public Collection<TransactionSynchronization> txSynchronizations() { return ctx.tm().synchronizations(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java index af8d2cf..d4947a4 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java @@ -48,7 +48,7 @@ import java.util.concurrent.atomic.*; import static org.apache.ignite.events.EventType.*; import static org.apache.ignite.internal.processors.cache.CacheFlag.*; import static org.apache.ignite.internal.processors.dr.GridDrType.*; -import static org.apache.ignite.transactions.IgniteTxState.*; +import static org.apache.ignite.transactions.TransactionState.*; /** * Adapter for cache entry. http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0b539033/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java index 2917a94..c03ecbb 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java @@ -66,7 +66,7 @@ import static org.apache.ignite.configuration.DeploymentMode.*; import static org.apache.ignite.internal.IgniteNodeAttributes.*; import static org.apache.ignite.internal.IgniteComponentType.*; import static org.apache.ignite.internal.processors.cache.GridCacheUtils.*; -import static org.apache.ignite.transactions.IgniteTxIsolation.*; +import static org.apache.ignite.transactions.TransactionIsolation.*; /** * Cache processor.