You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by na...@apache.org on 2026/10/07 18:55:58 UTC
(ignite) branch master updated: IGNITE-29112 Remove unused methods from transaction and cache internals (#13657)
This is an automated email from the ASF dual-hosted git repository.
NSAmelchev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/master by this push:
new 1fc07cb3627 IGNITE-29112 Remove unused methods from transaction and cache internals (#13657)
1fc07cb3627 is described below
commit 1fc07cb3627bb4e2cdea70ee5a5192028b76d243
Author: Nikita Amelchev <ns...@gmail.com>
AuthorDate: Wed Oct 7 21:55:49 2026 +0300
IGNITE-29112 Remove unused methods from transaction and cache internals (#13657)
---
.../cache/CacheAffinitySharedManager.java | 12 ---
.../processors/cache/CacheGroupContext.java | 71 +---------------
.../processors/cache/CacheMetricsImpl.java | 14 ----
.../processors/cache/ClusterCachesInfo.java | 14 ----
.../processors/cache/ExchangeDiscoveryEvents.java | 14 ----
.../processors/cache/GridCacheContext.java | 46 -----------
.../processors/cache/GridCacheEntryEx.java | 22 -----
.../processors/cache/GridCacheMapEntry.java | 62 --------------
.../processors/cache/GridCacheProcessor.java | 66 ---------------
.../processors/cache/GridCacheSharedContext.java | 36 ---------
.../internal/processors/cache/GridCacheUtils.java | 94 ----------------------
.../processors/cache/IgniteCacheProxyImpl.java | 72 ++---------------
.../distributed/dht/GridDhtTxLocalAdapter.java | 9 ---
.../cache/distributed/dht/GridDhtTxRemote.java | 5 --
.../preloader/GridDhtPartitionsExchangeFuture.java | 23 ------
.../dht/topology/PartitionsEvictManager.java | 18 -----
.../cache/distributed/near/GridNearTxRemote.java | 5 --
.../cache/transactions/IgniteTxAdapter.java | 7 --
.../processors/cache/transactions/IgniteTxMap.java | 7 --
.../processors/cache/transactions/TxDeadlock.java | 7 --
20 files changed, 9 insertions(+), 595 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
index 86ffd5ff4bd..24d808cd9be 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheAffinitySharedManager.java
@@ -330,18 +330,6 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
}
}
- /**
- * @return Group IDs.
- */
- public Set<Integer> waitGroups() {
- synchronized (mux) {
- if (waitInfo == null || !waitInfo.topVer.equals(lastAffVer))
- return Collections.emptySet();
-
- return new HashSet<>(waitInfo.waitGrps.keySet());
- }
- }
-
/**
* @param grpId Group id.
* @param partId Partition id.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
index 723c66e5183..80f33576a0d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheGroupContext.java
@@ -60,7 +60,6 @@ import org.apache.ignite.internal.processors.cache.query.continuous.CounterSkipC
import org.apache.ignite.internal.processors.compress.CompressionHandler;
import org.apache.ignite.internal.processors.metric.GridMetricManager;
import org.apache.ignite.internal.processors.plugin.IgnitePluginProcessor;
-import org.apache.ignite.internal.processors.query.QueryUtils;
import org.apache.ignite.internal.util.StripedCompositeReadWriteLock;
import org.apache.ignite.internal.util.lang.GridPlainRunnable;
import org.apache.ignite.internal.util.typedef.CI1;
@@ -161,9 +160,6 @@ public class CacheGroupContext {
/** */
private volatile boolean drEnabled;
- /** */
- private volatile boolean qryEnabled;
-
/** */
private volatile boolean locWalEnabled;
@@ -356,9 +352,6 @@ public class CacheGroupContext {
assert add : cctx.name();
- if (!qryEnabled && QueryUtils.isEnabled(cctx.config()))
- qryEnabled = true;
-
if (!drEnabled && cctx.isDrEnabled())
drEnabled = true;
@@ -388,24 +381,11 @@ public class CacheGroupContext {
caches = Collections.unmodifiableList(copy);
}
- if (QueryUtils.isEnabled(cctx.config())) {
- boolean qryEnabled = false;
-
- for (GridCacheContext<?, ?> cacheCtx : copy)
- if (QueryUtils.isEnabled(cacheCtx.config())) {
- qryEnabled = true;
-
- break;
- }
-
- this.qryEnabled = qryEnabled;
- }
-
if (cctx.isDrEnabled()) {
boolean drEnabled = false;
for (GridCacheContext<?, ?> cacheCtx : copy)
- if (QueryUtils.isEnabled(cacheCtx.config())) {
+ if (cacheCtx.isDrEnabled()) {
drEnabled = true;
break;
@@ -551,55 +531,6 @@ public class CacheGroupContext {
0));
}
- /**
- * @param part Partition.
- * @param key Key.
- * @param evtNodeId Event node ID.
- * @param type Event type.
- * @param newVal New value.
- * @param hasNewVal Has new value flag.
- * @param oldVal Old values.
- * @param hasOldVal Has old value flag.
- * @param keepBinary Keep binary flag.
- */
- public void addCacheEvent(
- int part,
- KeyCacheObject key,
- UUID evtNodeId,
- int type,
- @Nullable CacheObject newVal,
- boolean hasNewVal,
- @Nullable CacheObject oldVal,
- boolean hasOldVal,
- boolean keepBinary
- ) {
- List<GridCacheContext<?, ?>> caches = this.caches;
-
- for (GridCacheContext<?, ?> cctx : caches)
- if (!cctx.config().isEventsDisabled())
- cctx.events().addEvent(part,
- key,
- evtNodeId,
- null,
- null,
- null,
- type,
- newVal,
- hasNewVal,
- oldVal,
- hasOldVal,
- null,
- null,
- keepBinary);
- }
-
- /**
- * @return {@code True} if contains cache with query indexing enabled.
- */
- public boolean queriesEnabled() {
- return qryEnabled;
- }
-
/**
* @return {@code True} in case replication is enabled.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
index 59a3272cd9a..96944115989 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
@@ -1619,20 +1619,6 @@ public class CacheMetricsImpl implements CacheMetrics {
rebalancingBytesRate.add(batchSize);
}
- /**
- * @return Total number of allocated pages.
- */
- public long getTotalAllocatedPages() {
- return 0;
- }
-
- /**
- * @return Total number of evicted pages.
- */
- public long getTotalEvictedPages() {
- return 0;
- }
-
/**
* Off-heap read callback.
*
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
index 3a59cfca44e..9326dc68533 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ClusterCachesInfo.java
@@ -2758,20 +2758,6 @@ public class ClusterCachesInfo {
return restartingCaches.containsKey(cacheName);
}
- /**
- * @param cacheName Cache name which restart were cancelled.
- */
- public void removeRestartingCache(String cacheName) {
- restartingCaches.remove(cacheName);
- }
-
- /**
- * Clear up information about restarting caches.
- */
- public void removeRestartingCaches() {
- restartingCaches.clear();
- }
-
/** */
@Nullable public ClusterCacheGroupRecoveryData clusterCacheGroupRecoveryData() {
return clusterCacheGrpRecoveryData;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java
index bf7b4ac9217..96599df3f41 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/ExchangeDiscoveryEvents.java
@@ -190,20 +190,6 @@ public class ExchangeDiscoveryEvents {
return !leftSrvNodes.isEmpty();
}
- /**
- *
- */
- public Collection<ClusterNode> joinedServerNodes() {
- return joinedSrvNodes;
- }
-
- /**
- *
- */
- public Collection<ClusterNode> leftServerNodes() {
- return leftSrvNodes;
- }
-
/**
* @param cctx Context.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 5444815620d..90893e6e098 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -123,7 +123,6 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_READ_LOAD_BALANCIN
import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_STARTED;
import static org.apache.ignite.events.EventType.EVT_CACHE_REBALANCE_STOPPED;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS;
@@ -508,13 +507,6 @@ public class GridCacheContext<K, V> implements Externalizable {
return affNode;
}
- /**
- * @return {@code true} If this is a replicated cache and we are on a data node.
- */
- public boolean isReplicatedAffinityNode() {
- return isReplicated() && affinityNode();
- }
-
/**
* @throws IgniteCheckedException If failed to wait.
*/
@@ -1056,15 +1048,6 @@ public class GridCacheContext<K, V> implements Externalizable {
return res;
}
- /**
- * @return {@code True} If store writes should be performed from dht transactions. This happens if both
- * {@code writeBehindEnabled} and {@code writeBehindPreferPrimary} cache configuration properties
- * are set to {@code true} or the store is local.
- */
- public boolean writeToStoreFromDht() {
- return store().isLocal() || config().isWriteBehindEnabled();
- }
-
/**
* @return Cache transaction manager.
*/
@@ -1451,13 +1434,6 @@ public class GridCacheContext<K, V> implements Externalizable {
return config().isWriteThrough() && !skipStore();
}
- /**
- * @return {@code True} if invalidation is enabled.
- */
- public boolean isInvalidate() {
- return config().isInvalidate();
- }
-
/**
* @return {@code True} if synchronous commit is enabled.
*/
@@ -1465,20 +1441,6 @@ public class GridCacheContext<K, V> implements Externalizable {
return config().getWriteSynchronizationMode() == FULL_SYNC;
}
- /**
- * @return {@code True} if synchronous rollback is enabled.
- */
- public boolean syncRollback() {
- return config().getWriteSynchronizationMode() == FULL_SYNC;
- }
-
- /**
- * @return {@code True} if only primary node should be updated synchronously.
- */
- public boolean syncPrimary() {
- return config().getWriteSynchronizationMode() == PRIMARY_SYNC;
- }
-
/**
* @param nearNodeId Near node ID.
* @param topVer Topology version.
@@ -1692,14 +1654,6 @@ public class GridCacheContext<K, V> implements Externalizable {
return opCtx != null && opCtx.isKeepBinary();
}
- /**
- * @return {@code True} if the value for the cache object has to be copied because
- * of {@link CacheConfiguration#isCopyOnRead()}.
- */
- public boolean needValueCopy() {
- return affNode && config().isCopyOnRead();
- }
-
/**
* Converts temporary offheap object to heap-based.
*
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index bda9d3fbdc1..35c480ff4b7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -114,13 +114,6 @@ public interface GridCacheEntryEx {
*/
public boolean hasValue();
- /**
- * @param val New value.
- * @param ttl Time to live.
- * @return Old value.
- */
- public CacheObject rawPut(CacheObject val, long ttl);
-
/**
* Wraps this map entry into cache entry.
*
@@ -751,27 +744,12 @@ public interface GridCacheEntryEx {
*/
public boolean lockedBy(GridCacheVersion ver) throws GridCacheEntryRemovedException;
- /**
- * Will not fail for removed entries.
- *
- * @param threadId Thread ID to check.
- * @return {@code True} if lock is owned by given thread.
- */
- public boolean lockedByThreadUnsafe(long threadId);
-
/**
* @param ver Version to check for ownership.
* @return {@code True} if owner has the specified version.
*/
public boolean lockedByUnsafe(GridCacheVersion ver);
- /**
- *
- * @param lockVer Lock ID to check.
- * @return {@code True} if lock is owned by candidate.
- */
- public boolean lockedLocallyUnsafe(GridCacheVersion lockVer);
-
/**
* @param ver Lock version to check.
* @return {@code True} if has candidate with given lock ID.
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 c0c5bbaf68c..6ee75f06d90 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
@@ -511,24 +511,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
return null;
}
- /**
- * @return Value bytes and flag indicating whether value is byte array.
- */
- protected IgniteBiTuple<byte[], Byte> valueBytes0() {
- assert lock.isHeldByCurrentThread();
-
- assert val != null;
-
- try {
- byte[] bytes = val.valueBytes(cctx.cacheObjectContext());
-
- return new IgniteBiTuple<>(bytes, val.cacheObjectType());
- }
- catch (IgniteCheckedException e) {
- throw new IgniteException(e);
- }
- }
-
/**
* @param tx Transaction.
* @param key Key.
@@ -2442,22 +2424,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
return isRemoteDrUpdate(explicitVer) && cctx.disableTriggeringCacheInterceptorOnConflict();
}
- /** {@inheritDoc} */
- @Override public CacheObject rawPut(CacheObject val, long ttl) {
- lockEntry();
-
- try {
- CacheObject old = this.val;
-
- update(val, CU.toExpireTime(ttl), ttl, nextVersion(), true);
-
- return old;
- }
- finally {
- unlockEntry();
- }
- }
-
/** {@inheritDoc} */
@Override public boolean initialValue(
CacheObject val,
@@ -2932,20 +2898,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
}
}
- /** {@inheritDoc} */
- @Override public boolean lockedByThreadUnsafe(long threadId) {
- lockEntry();
-
- try {
- GridCacheMvcc mvcc = mvccExtras();
-
- return mvcc != null && mvcc.isLocallyOwnedByThread(threadId, true);
- }
- finally {
- unlockEntry();
- }
- }
-
/** {@inheritDoc} */
@Override public boolean lockedByUnsafe(GridCacheVersion ver) {
lockEntry();
@@ -2960,20 +2912,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
}
}
- /** {@inheritDoc} */
- @Override public boolean lockedLocallyUnsafe(GridCacheVersion lockVer) {
- lockEntry();
-
- try {
- GridCacheMvcc mvcc = mvccExtras();
-
- return mvcc != null && mvcc.isLocallyOwned(lockVer);
- }
- finally {
- unlockEntry();
- }
- }
-
/** {@inheritDoc} */
@Override public boolean hasLockCandidateUnsafe(GridCacheVersion ver) {
lockEntry();
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 f269b226037..1c1c4caa509 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
@@ -1504,20 +1504,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
return ret;
}
- /**
- * @param reqs Cache requests to start.
- * @param fut Completable future.
- */
- public void registrateProxyRestart(Map<String, DynamicCacheChangeRequest> reqs, GridFutureAdapter<?> fut) {
- for (IgniteCacheProxyImpl<?, ?> proxy : jCacheProxies.values()) {
- if (reqs.containsKey(proxy.getName()) &&
- proxy.isRestarting() &&
- !reqs.get(proxy.getName()).disabledAfterStart()
- )
- proxy.registrateFutureRestart(fut);
- }
- }
-
/**
* @param reqs Cache requests to start.
* @param initVer Init exchange version.
@@ -1631,26 +1617,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
);
}
- /**
- * Gets a collection of currently started public cache names.
- *
- * @return Collection of currently started public cache names
- */
- public Collection<String> publicAndDsCacheNames() {
- return F.viewReadOnly(cacheDescriptors().values(),
- new IgniteClosure<DynamicCacheDescriptor, String>() {
- @Override public String apply(DynamicCacheDescriptor desc) {
- return desc.cacheConfiguration().getName();
- }
- },
- new IgnitePredicate<DynamicCacheDescriptor>() {
- @Override public boolean apply(DynamicCacheDescriptor desc) {
- return desc.cacheType().userCache() || desc.cacheType() == CacheType.DATA_STRUCTURES;
- }
- }
- );
- }
-
/**
* Gets cache mode.
*
@@ -2406,38 +2372,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
}
}
- /**
- * Complete stopping of caches if they were marked as restarting but it failed.
- * @return Cache names of proxies which were restarted.
- */
- public List<String> resetRestartingProxies() {
- List<String> res = new ArrayList<>();
-
- for (Map.Entry<String, IgniteCacheProxyImpl<?, ?>> e : jCacheProxies.entrySet()) {
- IgniteCacheProxyImpl<?, ?> proxy = e.getValue();
-
- if (proxy == null)
- continue;
-
- if (proxy.isRestarting()) {
- String cacheName = e.getKey();
-
- res.add(cacheName);
-
- jCacheProxies.remove(cacheName);
-
- proxy.onRestarted(null, null);
-
- if (DataStructuresProcessor.isDataStructureCache(cacheName))
- ctx.dataStructures().restart(cacheName, null);
- }
- }
-
- cachesInfo.removeRestartingCaches();
-
- return res;
- }
-
/**
* @param desc Group descriptor.
* @param cacheType Cache type.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
index 7b7b770c5ea..aae8f54411c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedContext.java
@@ -25,7 +25,6 @@ import java.util.ListIterator;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicIntegerArray;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.IgniteSnapshot;
@@ -56,7 +55,6 @@ import org.apache.ignite.internal.processors.cache.store.CacheStoreManager;
import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
import org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager;
import org.apache.ignite.internal.processors.cache.transactions.TransactionMetricsAdapter;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.cache.version.GridCacheVersionManager;
import org.apache.ignite.internal.processors.cluster.IgniteChangeGlobalStateSupport;
import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
@@ -67,7 +65,6 @@ import org.apache.ignite.internal.util.future.GridFinishedFuture;
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.internal.CU;
-import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteFuture;
import org.apache.ignite.marshaller.Marshaller;
import org.apache.ignite.plugin.PluginProvider;
@@ -174,9 +171,6 @@ public class GridCacheSharedContext<K, V> {
/** */
private final IgniteLogger txRecoveryMsgLog;
- /** Concurrent DHT atomic updates counters. */
- private AtomicIntegerArray dhtAtomicUpdCnt;
-
/** Rebalance enabled flag. */
private boolean rebalanceEnabled = true;
@@ -264,9 +258,6 @@ public class GridCacheSharedContext<K, V> {
locStoreCnt = new AtomicInteger();
- if (dbMgr != null && CU.isPersistenceEnabled(kernalCtx.config()))
- dhtAtomicUpdCnt = new AtomicIntegerArray(kernalCtx.config().getSystemThreadPoolSize());
-
msgLog = kernalCtx.log(CU.CACHE_MSG_LOG_CATEGORY);
atomicMsgLog = kernalCtx.log(CU.ATOMIC_MSG_LOG_CATEGORY);
txPrepareMsgLog = kernalCtx.log(CU.TX_MSG_PREPARE_LOG_CATEGORY);
@@ -1151,33 +1142,6 @@ public class GridCacheSharedContext<K, V> {
mvccMgr.contextReset();
}
- /**
- * @param ver DHT atomic update future version.
- * @return Amount of active DHT atomic updates.
- */
- public int startDhtAtomicUpdate(GridCacheVersion ver) {
- assert dhtAtomicUpdCnt != null;
-
- return dhtAtomicUpdCnt.incrementAndGet(dhtAtomicUpdateIndex(ver));
- }
-
- /**
- * @param ver DHT atomic update future version.
- */
- public void finishDhtAtomicUpdate(GridCacheVersion ver) {
- assert dhtAtomicUpdCnt != null;
-
- dhtAtomicUpdCnt.decrementAndGet(dhtAtomicUpdateIndex(ver));
- }
-
- /**
- * @param ver Version.
- * @return Index.
- */
- private int dhtAtomicUpdateIndex(GridCacheVersion ver) {
- return U.safeAbs(ver.hashCode()) % dhtAtomicUpdCnt.length();
- }
-
/**
* @return {@code true} if cluster is in read-only mode.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 7f0b4d36bd1..76bf86defa0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -110,7 +110,6 @@ import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.lang.IgniteReducer;
import org.apache.ignite.lifecycle.LifecycleAware;
import org.apache.ignite.marshaller.jdk.JdkMarshaller;
-import org.apache.ignite.plugin.CachePluginConfiguration;
import org.apache.ignite.plugin.security.SecurityException;
import org.apache.ignite.spi.encryption.EncryptionSpi;
import org.apache.ignite.transactions.Transaction;
@@ -127,16 +126,12 @@ import static org.apache.ignite.cache.CacheMode.REPLICATED;
import static org.apache.ignite.cache.CacheRebalanceMode.ASYNC;
import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
import static org.apache.ignite.configuration.CacheConfiguration.DFLT_CACHE_MODE;
-import static org.apache.ignite.internal.GridTopic.TOPIC_REPLICATION;
import static org.apache.ignite.internal.processors.cache.GridCacheOperation.READ;
/**
* Cache utility methods.
*/
public class GridCacheUtils {
- /** Cheat cache ID for debugging and benchmarking purposes. */
- public static final int cheatCacheId;
-
/** @see IgniteSystemProperties#IGNITE_TTL_EXPIRE_BATCH_SIZE */
public static final int DFLT_TTL_EXPIRE_BATCH_SIZE = 5;
@@ -147,38 +142,6 @@ public class GridCacheUtils {
/** */
public static final int UNDEFINED_CACHE_ID = 0;
- /*
- *
- */
- static {
- String cheatCache = System.getProperty("CHEAT_CACHE");
-
- if (cheatCache != null) {
- cheatCacheId = cheatCache.hashCode();
-
- if (cheatCacheId == 0)
- throw new RuntimeException();
-
- System.out.println(">>> Cheat cache ID [id=" + cheatCacheId + ", name=" + cheatCache + ']');
- }
- else
- cheatCacheId = 0;
- }
-
- /**
- * Quickly checks if passed in cache ID is a "cheat cache ID" set by -DCHEAT_CACHE=user_cache_name
- * and resolved in static block above.
- *
- * FOR DEBUGGING AND TESTING PURPOSES!
- *
- * @param id Cache ID to check.
- * @return {@code True} if this is cheat cache ID.
- */
- @Deprecated
- public static boolean cheatCache(int id) {
- return cheatCacheId != 0 && id == cheatCacheId;
- }
-
/**
* Checks whether the separate lock wait timeout expires before the transaction timeout.
*
@@ -881,25 +844,6 @@ public class GridCacheUtils {
return DEFAULT_MASK_NAME.equals(cacheName) ? null : cacheName;
}
- /**
- * Get topic to which replication requests are sent.
- *
- * @return Topic to which replication requests are sent.
- */
- public static String replicationTopicSend() {
- return TOPIC_REPLICATION.toString();
- }
-
- /**
- * Get topic to which replication responses are sent.
- *
- * @param cacheName Cache name.
- * @return Topic to which replication responses are sent.
- */
- public static String replicationTopicReceive(String cacheName) {
- return TOPIC_REPLICATION + "-" + mask(cacheName);
- }
-
/**
* Checks that local and remove configurations have the same value of given attribute.
*
@@ -1230,44 +1174,6 @@ public class GridCacheUtils {
return cacheObj != null ? cacheObj.<T>value(ctx.cacheObjectContext(), cpy) : null;
}
- /**
- * @param cfg Cache configuration.
- * @param cl Type of cache plugin configuration.
- * @return Cache plugin configuration by type from cache configuration or <code>null</code>.
- */
- public static <C extends CachePluginConfiguration> C cachePluginConfiguration(
- CacheConfiguration cfg, Class<C> cl) {
- if (cfg.getPluginConfigurations() != null) {
- for (CachePluginConfiguration pluginCfg : cfg.getPluginConfigurations()) {
- if (pluginCfg.getClass() == cl)
- return (C)pluginCfg;
- }
- }
-
- return null;
- }
-
- /**
- * @param cfg Config.
- * @param cls Class.
- * @return Not <code>null</code> list.
- */
- public static <T extends CachePluginConfiguration> List<T> cachePluginConfigurations(IgniteConfiguration cfg,
- Class<T> cls) {
- List<T> res = new ArrayList<>();
-
- if (cfg.getCacheConfiguration() != null) {
- for (CacheConfiguration ccfg : cfg.getCacheConfiguration()) {
- for (CachePluginConfiguration pluginCcfg : ccfg.getPluginConfigurations()) {
- if (cls == pluginCcfg.getClass())
- res.add((T)pluginCcfg);
- }
- }
- }
-
- return res;
- }
-
/**
* @param node Node.
* @param filter Node filter.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
index 2ab4e3d990a..50e71d5807e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxyImpl.java
@@ -138,7 +138,7 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
private CacheManager cacheMgr;
/** Future indicates that cache is under restarting. */
- private final AtomicReference<RestartFuture> restartFut;
+ private final AtomicReference<GridFutureAdapter<Void>> restartFut;
/** Flag indicates that proxy is closed. */
private volatile boolean closed;
@@ -178,7 +178,7 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
private IgniteCacheProxyImpl(
@NotNull GridCacheContext<K, V> ctx,
@NotNull IgniteInternalCache<K, V> delegate,
- @NotNull AtomicReference<RestartFuture> restartFut,
+ @NotNull AtomicReference<GridFutureAdapter<Void>> restartFut,
boolean async
) {
super(async);
@@ -2216,7 +2216,7 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
* Throws {@code IgniteCacheRestartingException} if proxy is restarting.
*/
public void checkRestart(boolean noWait) {
- RestartFuture curFut = restartFut.get();
+ GridFutureAdapter<Void> curFut = restartFut.get();
if (curFut != null) {
try {
@@ -2245,12 +2245,12 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
* Suspend this cache proxy.
* To make cache proxy active again, it's needed to restart it.
*/
- public RestartFuture suspend() {
+ public GridFutureAdapter<Void> suspend() {
while (true) {
- RestartFuture curFut = this.restartFut.get();
+ GridFutureAdapter<Void> curFut = this.restartFut.get();
if (curFut == null) {
- RestartFuture restartFut = new RestartFuture(cacheName);
+ GridFutureAdapter<Void> restartFut = new GridFutureAdapter<>();
if (this.restartFut.compareAndSet(null, restartFut)) {
synchronized (this) {
@@ -2271,23 +2271,13 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
}
}
- /**
- * @param fut Finish restart future.
- */
- public void registrateFutureRestart(GridFutureAdapter<?> fut) {
- RestartFuture curFut = restartFut.get();
-
- if (curFut != null)
- curFut.addRestartFinishedFuture(fut);
- }
-
/**
* If proxy is already being restarted, returns future to wait on, else restarts this cache proxy.
*
* @param cache To use for restart proxy.
*/
public void opportunisticRestart(IgniteInternalCache<K, V> cache) {
- RestartFuture restartFut = new RestartFuture(cacheName);
+ GridFutureAdapter<Void> restartFut = new GridFutureAdapter<>();
while (true) {
if (this.restartFut.compareAndSet(null, restartFut)) {
@@ -2318,7 +2308,7 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
* @param delegate New delegate.
*/
public void onRestarted(GridCacheContext ctx, IgniteInternalCache delegate) {
- RestartFuture restartFut = this.restartFut.get();
+ GridFutureAdapter<Void> restartFut = this.restartFut.get();
assert restartFut != null;
@@ -2343,52 +2333,6 @@ public class IgniteCacheProxyImpl<K, V> extends AsyncSupportAdapter<IgniteCache<
return context().kernalContext().getAsyncContinuationExecutor();
}
- /**
- *
- */
- private class RestartFuture extends GridFutureAdapter<Void> {
- /** */
- private final String name;
-
- /** */
- private volatile GridFutureAdapter<?> restartFinishFut;
-
- /** */
- private RestartFuture(String name) {
- this.name = name;
- }
-
- /**
- *
- */
- void checkRestartOrAwait() {
- GridFutureAdapter<?> fut = restartFinishFut;
-
- if (fut != null) {
- try {
- fut.get();
- }
- catch (IgniteCheckedException e) {
- throw U.convertException(e);
- }
-
- return;
- }
-
- throw new IgniteCacheRestartingException(
- new IgniteFutureImpl<>(this, exec()),
- "Cache is restarting: " + name
- );
- }
-
- /**
- *
- */
- void addRestartFinishedFuture(GridFutureAdapter<?> fut) {
- restartFinishFut = fut;
- }
- }
-
/** {@inheritDoc} */
@Override public String toString() {
return S.toString(IgniteCacheProxyImpl.class, this);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index 74140402ca9..99ccfc0b5cf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@ -380,15 +380,6 @@ public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter {
return removeMapping(nodeId, entry, dhtMap);
}
- /**
- * @param nodeId Node ID.
- * @param entry Entry to remove.
- * @return {@code True} if was removed.
- */
- boolean removeNearMapping(UUID nodeId, GridCacheEntryEx entry) {
- return removeMapping(nodeId, entry, nearMap);
- }
-
/**
* Removes tx entry from local DHT transaction state and all DHT/near mappings.
*
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
index de6676f8f13..5ebf8b336a6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxRemote.java
@@ -204,11 +204,6 @@ public class GridDhtTxRemote extends GridDistributedTxRemoteAdapter {
topologyVersion(topVer);
}
- /** {@inheritDoc} */
- @Override public boolean remote() {
- return true;
- }
-
/** {@inheritDoc} */
@Override public boolean dht() {
return true;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
index 2cc8a517218..92bfca434e9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsExchangeFuture.java
@@ -369,10 +369,6 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
@GridToStringExclude
private GridDhtPartitionsFullMessage delayedLatestMsg;
- /** Future for wait all exchange listeners comepleted. */
- @GridToStringExclude
- private final GridFutureAdapter<?> afterLsnrCompleteFut = new GridFutureAdapter<>();
-
/** Time bag to measure and store exchange stages times. */
@GridToStringExclude
private final TimeBag timeBag;
@@ -726,21 +722,6 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
&& exchActions.cacheStopRequests().isEmpty();
}
- /**
- * @param cacheOrGroupName Group or cache name for reset lost partitions.
- * @return {@code True} if reset lost partition exchange.
- */
- public boolean resetLostPartitionFor(String cacheOrGroupName) {
- return exchActions != null && exchActions.cachesToResetLostPartitions().contains(cacheOrGroupName);
- }
-
- /**
- * @return {@code True} if update counters finalization exchange.
- */
- public boolean finalizeCounters() {
- return exchActions != null && exchActions.finalizePartitionCounters();
- }
-
/**
* @return {@code True} if activate cluster exchange.
*/
@@ -1005,8 +986,6 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
}
}
- cctx.cache().registrateProxyRestart(resolveCacheRequests(exchActions), afterLsnrCompleteFut);
-
exchangeType = exchange;
for (PartitionsExchangeAware comp : cctx.exchange().exchangeAwareComponents())
@@ -2451,8 +2430,6 @@ public class GridDhtPartitionsExchangeFuture extends GridDhtTopologyFutureAdapte
});
if (super.onDone(res, err)) {
- afterLsnrCompleteFut.onDone();
-
if (err == null) {
updateDurationHistogram(System.currentTimeMillis() - initTime);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java
index 9d992b98686..c99dd0ec955 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/PartitionsEvictManager.java
@@ -328,24 +328,6 @@ public class PartitionsEvictManager extends GridCacheSharedManagerAdapter {
busyLock.writeLock().lock();
}
- /**
- * Await evict finish partition.
- */
- private void awaitFinish(Integer part, IgniteInternalFuture<?> fut) {
- // Wait for last offered partition eviction completion
- try {
- if (log.isInfoEnabled())
- log.info("Await partition evict, grpName=" + grp.cacheOrGroupName() +
- ", grpId=" + grp.groupId() + ", partId=" + part);
-
- fut.get();
- }
- catch (IgniteCheckedException e) {
- if (log.isDebugEnabled())
- log.warning("Failed to await partition eviction during stopping.", e);
- }
- }
-
/**
* Shows progress group of eviction.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
index 42ca9f8fa8e..373107e0b9e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
@@ -142,11 +142,6 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter {
topologyVersion(topVer);
}
- /** {@inheritDoc} */
- @Override public boolean remote() {
- return true;
- }
-
/** {@inheritDoc} */
@Override public boolean near() {
return true;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index 3a058189d09..fa877cd4a45 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -645,13 +645,6 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter implement
return log;
}
- /**
- * @return True if transaction reflects changes in primary -> backup direction.
- */
- public boolean remote() {
- return false;
- }
-
/** {@inheritDoc} */
@Override public boolean near() {
return false;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxMap.java
index 6b79550f0fb..3c1ca6c0277 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxMap.java
@@ -85,13 +85,6 @@ public class IgniteTxMap extends AbstractMap<IgniteTxKey, IgniteTxEntry> impleme
return this;
}
- /**
- * @return Sealed flag.
- */
- boolean sealed() {
- return sealed;
- }
-
/** {@inheritDoc} */
@Override public Set<Entry<IgniteTxKey, IgniteTxEntry>> entrySet() {
if (entrySet == null) {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlock.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlock.java
index d514824bf73..43f0a118b93 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlock.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/TxDeadlock.java
@@ -68,13 +68,6 @@ public class TxDeadlock {
this.txs = txs;
}
- /**
- * @return Deadlock represented as cycle of transaction in wait-for-graph.
- */
- public List<GridCacheVersion> cycle() {
- return cycle;
- }
-
/**
* @param ctx Context.
*/