You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dw...@apache.org on 2026/10/06 11:01:09 UTC
(ignite) branch master updated: IGNITE-29105 Remove unused methods from internal core classes (#13645)
This is an automated email from the ASF dual-hosted git repository.
wernerdv 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 8206a98d2ba IGNITE-29105 Remove unused methods from internal core classes (#13645)
8206a98d2ba is described below
commit 8206a98d2ba12a33a1c87f85b7d509a5f79fe533
Author: Dmitry Werner <dw...@apache.org>
AuthorDate: Tue Oct 6 16:00:57 2026 +0500
IGNITE-29105 Remove unused methods from internal core classes (#13645)
---
.../org/apache/ignite/internal/IgniteKernal.java | 13 ---
.../ignite/internal/jdbc/thin/JdbcThinTcpIo.java | 22 ------
.../managers/communication/GridIoManager.java | 5 --
.../pagemem/impl/PageMemoryNoStoreImpl.java | 20 -----
.../cache/CacheAffinitySharedManager.java | 31 --------
.../processors/cache/ClusterCachesInfo.java | 28 -------
.../processors/cache/GridCacheAffinityManager.java | 3 -
.../processors/cache/GridCacheMapEntry.java | 36 ---------
.../processors/cache/GridCacheProcessor.java | 60 --------------
.../processors/cache/GridCacheSharedContext.java | 16 ----
.../dht/preloader/GridDhtPartitionDemander.java | 14 ----
.../dht/preloader/GridDhtPreloader.java | 9 ---
.../dht/topology/GridClientPartitionTopology.java | 30 ++-----
.../dht/topology/GridDhtLocalPartition.java | 8 --
.../GridCacheDatabaseSharedManager.java | 13 ---
.../cache/persistence/GridCacheOffheapManager.java | 92 ----------------------
.../IgniteCacheDatabaseSharedManager.java | 12 ---
.../persistence/freelist/AbstractFreeList.java | 28 -------
.../cache/persistence/pagemem/FullPageIdTable.java | 37 ---------
.../cache/persistence/pagemem/PageMemoryImpl.java | 23 ------
.../cache/query/GridCacheQueryFutureAdapter.java | 30 -------
.../GridCacheAtomicReferenceImpl.java | 7 --
.../datastructures/GridCacheAtomicStampedImpl.java | 7 --
.../processors/marshaller/ClientRequestFuture.java | 16 ----
.../processors/platform/cache/PlatformCache.java | 16 ----
.../processors/platform/utils/PlatformUtils.java | 22 ------
.../query/stat/IgniteGlobalStatisticsManager.java | 21 -----
.../processors/query/stat/StatisticsProcessor.java | 27 -------
.../handlers/top/GridTopologyCommandHandler.java | 19 -----
.../tcp/redis/GridRedisProtocolParser.java | 3 -
.../ignite/internal/util/IgniteStopwatch.java | 19 -----
31 files changed, 5 insertions(+), 682 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index 09d8fbeab96..715e206f923 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -73,7 +73,6 @@ import org.apache.ignite.IgniteTransactions;
import org.apache.ignite.Ignition;
import org.apache.ignite.MemoryMetrics;
import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cluster.BaselineNode;
import org.apache.ignite.cluster.ClusterGroup;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.cluster.ClusterState;
@@ -2687,18 +2686,6 @@ public class IgniteKernal implements IgniteEx, Externalizable {
cluster().state(active ? ClusterState.ACTIVE : ClusterState.INACTIVE);
}
- /** */
- private Collection<BaselineNode> baselineNodes() {
- Collection<ClusterNode> srvNodes = cluster().forServers().nodes();
-
- ArrayList baselineNodes = new ArrayList(srvNodes.size());
-
- for (ClusterNode clN : srvNodes)
- baselineNodes.add(clN);
-
- return baselineNodes;
- }
-
/** {@inheritDoc} */
@Override public void resetLostPartitions(Collection<String> cacheNames) {
CU.validateCacheNames(cacheNames);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java
index 53146e2fb84..c6f42c948b4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinTcpIo.java
@@ -28,10 +28,8 @@ import java.util.EnumSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
-import java.util.Random;
import java.util.Set;
import java.util.UUID;
-import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import javax.cache.configuration.Factory;
import org.apache.ignite.IgniteCheckedException;
@@ -68,7 +66,6 @@ import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.lang.IgniteProductVersion;
import org.apache.ignite.transactions.TransactionIsolation;
-import static java.lang.Math.abs;
import static org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.isolation;
import static org.apache.ignite.internal.jdbc.thin.JdbcThinUtils.nullableBooleanToByte;
import static org.apache.ignite.internal.processors.odbc.jdbc.JdbcConnectionContext.DEFAULT_NESTED_TX_MODE;
@@ -131,9 +128,6 @@ public class JdbcThinTcpIo {
/** Initial output for query close message. */
private static final int QUERY_CLOSE_MSG_SIZE = 9;
- /** Random. */
- private static final AtomicLong IDX_GEN = new AtomicLong(new Random(U.currentTimeMillis()).nextLong());
-
/** Connection properties. */
private final ConnectionProperties connProps;
@@ -745,22 +739,6 @@ public class JdbcThinTcpIo {
return isolationLevelsSupported.contains(isolation);
}
- /**
- * Get next server index.
- *
- * @param len Number of servers.
- * @return Index of the next server to connect to.
- */
- private static int nextServerIndex(int len) {
- if (len == 1)
- return 0;
- else {
- long nextIdx = IDX_GEN.getAndIncrement();
-
- return (int)(abs(nextIdx) % len);
- }
- }
-
/**
* Enable/disable socket timeout with specified timeout.
*
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index 7a216c65a58..2f337812d69 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -1757,11 +1757,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Object>>
throw err;
}
- /** */
- private long getInverseConnectionWaitTimeout() {
- return ctx.config().getFailureDetectionTimeout();
- }
-
/** @return A {@link GridIoMessage} wrapper for {@code msg}. */
public GridIoMessage createGridIoMessage(
Object topic,
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
index 08507d4a82c..bd5b48f8d8d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
@@ -147,9 +147,6 @@ public class PageMemoryNoStoreImpl implements PageMemory {
/** */
private final DataRegionMetricsImpl dataRegionMetrics;
- /** */
- private final AtomicInteger selector = new AtomicInteger();
-
/** */
private final OffheapReadWriteLock rwLock;
@@ -397,23 +394,6 @@ public class PageMemoryNoStoreImpl implements PageMemory {
return pageSize();
}
- /**
- * @return Next index.
- */
- private int nextRoundRobinIndex() {
- while (true) {
- int idx = selector.get();
-
- int nextIdx = idx + 1;
-
- if (nextIdx >= segments.length)
- nextIdx = 0;
-
- if (selector.compareAndSet(idx, nextIdx))
- return nextIdx;
- }
- }
-
/** {@inheritDoc} */
@Override public long loadedPages() {
return allocatedPages.get();
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 89125551013..86ffd5ff4bd 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
@@ -1625,24 +1625,6 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
}
- /**
- * Selects current alive owners for some partition as affinity distribution.
- *
- * @param aliveNodes Alive cluster nodes.
- * @param curOwners Current affinity owners for some partition.
- *
- * @return List of current alive affinity owners.
- * {@code null} if affinity owners should be inherited from ideal assignment as is.
- */
- private @Nullable List<ClusterNode> selectCurrentAliveOwners(
- Set<ClusterNode> aliveNodes,
- List<ClusterNode> curOwners
- ) {
- List<ClusterNode> aliveCurOwners = curOwners.stream().filter(aliveNodes::contains).collect(Collectors.toList());
-
- return !aliveCurOwners.isEmpty() ? aliveCurOwners : null;
- }
-
/**
* Calculates affinity on coordinator for custom event types that require centralized assignment.
*
@@ -2611,19 +2593,6 @@ public class CacheAffinitySharedManager<K, V> extends GridCacheSharedManagerAdap
}
}
- /**
- * @param nodes Nodes.
- * @return IDs.
- */
- private static List<UUID> toIds0(List<ClusterNode> nodes) {
- List<UUID> partIds = new ArrayList<>(nodes.size());
-
- for (int i = 0; i < nodes.size(); i++)
- partIds.add(nodes.get(i).id());
-
- return partIds;
- }
-
/**
* @param topVer Topology version.
* @param ids IDs.
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 3cbaf1cf770..3a59cfca44e 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
@@ -1225,34 +1225,6 @@ public class ClusterCachesInfo {
return false;
}
- /**
- * Validate correcteness of new cache start request.
- *
- * @param err Current error.
- * @param persistedCfgs {@code True} if process start of persisted caches during cluster activation.
- * @param res Accumulator for cache change process results.
- * @param req Cache change request.
- *
- * @return {@code True} if there is no errors due initialization.
- */
- private boolean validateStartNewCache(
- @Nullable IgniteCheckedException err,
- boolean persistedCfgs,
- CacheChangeProcessResult res,
- DynamicCacheChangeRequest req
- ) {
- if (err != null) {
- if (persistedCfgs)
- res.errs.add(err);
- else
- ctx.cache().completeCacheStartFuture(req, false, err);
-
- return false;
- }
-
- return true;
- }
-
/**
* @param dataBag Discovery data bag.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
index 889b848a5b0..d31f0cc20d3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityManager.java
@@ -41,9 +41,6 @@ import org.jetbrains.annotations.Nullable;
* Cache affinity manager.
*/
public class GridCacheAffinityManager extends GridCacheManagerAdapter {
- /** */
- private static final AffinityTopologyVersion LOC_CACHE_TOP_VER = new AffinityTopologyVersion(1);
-
/** */
private static final String FAILED_TO_FIND_CACHE_ERR_MSG = "Failed to find cache (cache was not started " +
"yet or cache was already stopped): ";
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 021fdd0408d..c0c5bbaf68c 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
@@ -30,7 +30,6 @@ import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.function.Supplier;
import javax.cache.Cache;
-import javax.cache.expiry.ExpiryPolicy;
import javax.cache.processor.EntryProcessor;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.IgniteCheckedException;
@@ -1732,20 +1731,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
return c.updateRes;
}
- /**
- * @param val Value.
- * @param cacheObj Cache object.
- * @param keepBinary Keep binary flag.
- * @param cpy Copy flag.
- * @return Cache object value.
- */
- @Nullable private Object value(@Nullable Object val, @Nullable CacheObject cacheObj, boolean keepBinary, boolean cpy) {
- if (val != null)
- return val;
-
- return cctx.unwrapBinaryIfNeeded(cacheObj, keepBinary, cpy, null);
- }
-
/**
* @param expiry Expiration policy.
* @return Tuple holding initial TTL and expire time with the given expiry.
@@ -2174,18 +2159,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
return !isNear();
}
- /**
- * Update TTL if it is changed.
- *
- * @param expiryPlc Expiry policy.
- */
- private void updateTtlUnlocked(ExpiryPolicy expiryPlc) throws IgniteCheckedException {
- long ttl = CU.toTtl(expiryPlc.getExpiryForAccess());
-
- if (ttl != CU.TTL_NOT_CHANGED)
- updateTtlUnlocked(ttl);
- }
-
/**
* Update TTL is it is changed.
*
@@ -2294,15 +2267,6 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
}
}
- /**
- * Gets hash value for the entry key.
- *
- * @return Hash value.
- */
- int hash() {
- return hash;
- }
-
/** {@inheritDoc} */
@Nullable @Override public CacheObject peek(
boolean heap,
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 e55a14d5d08..f269b226037 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
@@ -2878,32 +2878,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
sharedCtx.deactivate();
}
- /**
- * @param rmtNode Remote node to check.
- * @return Data storage configuration
- */
- private DataStorageConfiguration extractDataStorage(ClusterNode rmtNode) {
- return GridCacheUtils.extractDataStorage(
- rmtNode,
- ctx.marshallerContext().jdkMarshaller(),
- U.resolveClassLoader(ctx.config())
- );
- }
-
- /**
- * @param dataStorageCfg User-defined data regions.
- */
- private Map<String, DataRegionConfiguration> dataRegionCfgs(DataStorageConfiguration dataStorageCfg) {
- if (dataStorageCfg != null) {
- return Optional.ofNullable(dataStorageCfg.getDataRegionConfigurations())
- .map(Stream::of)
- .orElseGet(Stream::empty)
- .collect(Collectors.toMap(DataRegionConfiguration::getName, e -> e));
- }
-
- return Collections.emptyMap();
- }
-
/**
* Force checkpoint and remove offheap checkpoint listener after it was finished.
*
@@ -3562,40 +3536,6 @@ public class GridCacheProcessor extends GridProcessorAdapter {
}
}
- /**
- * Checks that cluster in a {@link ClusterState#ACTIVE_READ_ONLY} state.
- *
- * @param opName Operation name.
- * @param cfgs Stored cache configurations.
- * @throws CacheException If cluster in a {@link ClusterState#ACTIVE_READ_ONLY} state.
- */
- private void checkReadOnlyState(String opName, Collection<StoredCacheData> cfgs) {
- IgniteOutClosure<String> cacheNameClo = null;
- IgniteOutClosure<String> cacheGrpNameClo = null;
-
- if (!F.isEmpty(cfgs)) {
- if (cfgs.size() == 1) {
- CacheConfiguration cfg = cfgs.iterator().next().config();
-
- cacheNameClo = cfg::getName;
- cacheGrpNameClo = cfg::getGroupName;
- }
- else {
- cacheNameClo = () -> cfgs.stream()
- .map(StoredCacheData::config)
- .map(CacheConfiguration::getName)
- .collect(toList()).toString();
-
- cacheGrpNameClo = () -> cfgs.stream()
- .map(StoredCacheData::config)
- .map(CacheConfiguration::getGroupName)
- .collect(toList()).toString();
- }
- }
-
- checkReadOnlyState(opName, cacheGrpNameClo, cacheNameClo);
- }
-
/**
* Checks that cluster in a {@link ClusterState#ACTIVE_READ_ONLY} state.
*
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 50e969677b4..7b7b770c5ea 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
@@ -69,7 +69,6 @@ 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.lang.IgniteInClosure;
import org.apache.ignite.marshaller.Marshaller;
import org.apache.ignite.plugin.PluginProvider;
import org.jetbrains.annotations.Nullable;
@@ -513,21 +512,6 @@ public class GridCacheSharedContext<K, V> {
return (Collection)ctxMap.values();
}
- /**
- * @param c Cache context closure.
- */
- void forAllCaches(final IgniteInClosure<GridCacheContext> c) {
- for (Integer cacheId : ctxMap.keySet()) {
- ctxMap.computeIfPresent(cacheId,
- (cacheId1, ctx) -> {
- c.apply(ctx);
-
- return ctx;
- }
- );
- }
- }
-
/**
* @return Cache processor.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index 640dc953e69..30106cc3e9d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -307,13 +307,6 @@ public class GridDhtPartitionDemander {
lastExchangeFut = lastFut;
}
- /**
- * @return Collection of supplier nodes. Value {@code empty} means rebalance already finished.
- */
- Collection<UUID> remainingNodes() {
- return rebalanceFut.remainingNodes();
- }
-
/**
* This method initiates new rebalance process from given {@code assignments} by creating new rebalance
* future based on them. Cancels previous rebalance future and sends rebalance started event.
@@ -1620,13 +1613,6 @@ public class GridDhtPartitionDemander {
}
}
- /**
- * @return Collection of supplier nodes. Value {@code empty} means rebalance already finished.
- */
- private synchronized Collection<UUID> remainingNodes() {
- return remaining.keySet();
- }
-
/**
*
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index ef2ecff0edc..971f1107110 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -25,11 +25,9 @@ import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
-import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteSystemProperties;
import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.NodeStoppingException;
import org.apache.ignite.internal.processors.affinity.AffinityAssignment;
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
import org.apache.ignite.internal.processors.cache.CacheGroupContext;
@@ -138,13 +136,6 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
}
}
- /**
- * @return Node stop exception.
- */
- private IgniteCheckedException stopError() {
- return new NodeStoppingException("Operation has been cancelled (cache or node is stopping).");
- }
-
/**
* @return Rebalance cancellation optimization flag.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridClientPartitionTopology.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridClientPartitionTopology.java
index 9ca26f636ae..750f99f3767 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridClientPartitionTopology.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridClientPartitionTopology.java
@@ -74,9 +74,6 @@ import static org.apache.ignite.internal.util.lang.ClusterNodeFunc.nodeIds;
*/
@GridToStringExclude
public class GridClientPartitionTopology implements GridDhtPartitionTopology {
- /** */
- private static final GridDhtPartitionState[] MOVING_STATES = new GridDhtPartitionState[] {MOVING};
-
/** If true, then check consistency. */
private static final boolean CONSISTENCY_CHECK = false;
@@ -586,10 +583,9 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
* @param p Partition.
* @param topVer Topology version ({@code -1} for all nodes).
* @param state Partition state.
- * @param states Additional partition states.
* @return List of nodes for the partition.
*/
- private List<ClusterNode> nodes(int p, AffinityTopologyVersion topVer, GridDhtPartitionState state, GridDhtPartitionState... states) {
+ private List<ClusterNode> nodes(int p, AffinityTopologyVersion topVer, GridDhtPartitionState state) {
Collection<UUID> allIds = nodeIds(discoCache.cacheGroupAffinityNodes(grpId));
lock.readLock().lock();
@@ -612,7 +608,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
if (topVer.topologyVersion() > 0 && !F.contains(allIds, id))
continue;
- if (hasState(p, id, state, states)) {
+ if (hasState(p, id, state)) {
ClusterNode n = discoCache.node(id);
if (n != null && (topVer.topologyVersion() < 0 || n.order() <= topVer.topologyVersion()))
@@ -629,7 +625,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
/** {@inheritDoc} */
@Override public List<ClusterNode> owners(int p, AffinityTopologyVersion topVer) {
- return nodes(p, topVer, OWNING, null);
+ return nodes(p, topVer, OWNING);
}
/** {@inheritDoc} */
@@ -678,16 +674,7 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
/** {@inheritDoc} */
@Override public List<ClusterNode> moving(int p) {
- return nodes(p, AffinityTopologyVersion.NONE, MOVING, null);
- }
-
- /**
- * @param p Partition.
- * @param topVer Topology version.
- * @return List of nodes in state OWNING or MOVING.
- */
- private List<ClusterNode> ownersAndMoving(int p, AffinityTopologyVersion topVer) {
- return nodes(p, topVer, OWNING, MOVING_STATES);
+ return nodes(p, AffinityTopologyVersion.NONE, MOVING);
}
/** {@inheritDoc} */
@@ -1444,11 +1431,9 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
* @param p Partition.
* @param nodeId Node ID.
* @param match State to match.
- * @param matches Additional states.
* @return Filter for owners of this partition.
*/
- private boolean hasState(final int p, @Nullable UUID nodeId, final GridDhtPartitionState match,
- final GridDhtPartitionState... matches) {
+ private boolean hasState(final int p, @Nullable UUID nodeId, final GridDhtPartitionState match) {
if (nodeId == null)
return false;
@@ -1460,11 +1445,6 @@ public class GridClientPartitionTopology implements GridDhtPartitionTopology {
if (state == match)
return true;
-
- if (matches != null && matches.length > 0)
- for (GridDhtPartitionState s : matches)
- if (state == s)
- return true;
}
return false;
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
index 34ab379e525..6fa941cfa9a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/topology/GridDhtLocalPartition.java
@@ -780,14 +780,6 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
return true;
}
- /**
- * @param state State.
- * @return {@code True} if partition has no reservations and empty.
- */
- private boolean freeAndEmpty(long state) {
- return isEmpty() && getSize(state) == 0 && getReservations(state) == 0;
- }
-
/**
* Moves partition state to {@code EVICTED} if possible.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 102469f82f6..6ba634cecd0 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -164,7 +164,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import static java.util.Collections.emptyList;
-import static java.util.Objects.nonNull;
import static java.util.function.Function.identity;
import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet;
@@ -1507,18 +1506,6 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
return rejected == null ? emptyList() : rejected;
}
- /**
- * Return short information about cache.
- *
- * @param cacheCtx Cache context.
- * @return Short cache info.
- */
- private String cacheInfo(GridCacheContext cacheCtx) {
- assert nonNull(cacheCtx);
-
- return "name=" + cacheCtx.name() + ", grpName=" + cacheCtx.group().name();
- }
-
/** {@inheritDoc} */
@Override public void onCacheGroupsStopped(Collection<IgniteBiTuple<CacheGroupContext, Boolean>> stoppedGrps) {
Map<PageMemoryEx, Collection<Integer>> destroyed = new HashMap<>();
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
index 28911df7c78..5e3ff63d3dd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheOffheapManager.java
@@ -81,9 +81,6 @@ import org.apache.ignite.internal.processors.cache.persistence.freelist.SimpleDa
import org.apache.ignite.internal.processors.cache.persistence.migration.UpgradePendingTreeToPerPartitionTask;
import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryEx;
import org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMetrics;
-import org.apache.ignite.internal.processors.cache.persistence.partstate.GroupPartitionId;
-import org.apache.ignite.internal.processors.cache.persistence.partstate.PagesAllocationRange;
-import org.apache.ignite.internal.processors.cache.persistence.partstate.PartitionAllocationMap;
import org.apache.ignite.internal.processors.cache.persistence.partstorage.PartitionMetaStorage;
import org.apache.ignite.internal.processors.cache.persistence.partstorage.PartitionMetaStorageImpl;
import org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree;
@@ -771,95 +768,6 @@ public class GridCacheOffheapManager extends IgniteCacheOffheapManagerImpl imple
return cntrsPageId;
}
- /**
- * @param ctx Context.
- */
- private void addPartitions(Context ctx) throws IgniteCheckedException {
- int grpId = grp.groupId();
- PageMemoryEx pageMem = (PageMemoryEx)grp.dataRegion().pageMemory();
-
- long metaPageId = PageMemory.META_PAGE_ID;
- long metaPage = pageMem.acquirePage(grpId, metaPageId);
-
- try {
- long metaPageAddr = pageMem.writeLock(grpId, metaPageId, metaPage);
-
- if (metaPageAddr == 0L) {
- U.warn(log, "Failed to acquire write lock for index meta page [grpId=" + grpId +
- ", metaPageId=" + metaPageId + ']');
-
- return;
- }
-
- boolean changed = false;
-
- try {
- PageMetaIO metaIo = PageMetaIO.getPageIO(metaPageAddr);
-
- int pageCnt = this.ctx.pageStore().pages(grpId, PageIdAllocator.INDEX_PARTITION);
-
- changed = metaIo.setCandidatePageCount(metaPageAddr, pageCnt);
-
- // Following method doesn't modify page data, it only reads last allocated page count from it.
- addPartition(
- null,
- ctx.partitionStatMap(),
- metaPageAddr,
- metaIo,
- grpId,
- PageIdAllocator.INDEX_PARTITION,
- pageCnt,
- -1);
- }
- finally {
- pageMem.writeUnlock(grpId, metaPageId, metaPage, null, changed);
- }
- }
- finally {
- pageMem.releasePage(grpId, metaPageId, metaPage);
- }
- }
-
- /**
- * @param part Local partition.
- * @param map Map to add values to.
- * @param metaPageAddr Meta page address
- * @param io Page Meta IO
- * @param grpId Cache Group ID.
- * @param currAllocatedPageCnt total number of pages allocated for partition <code>[partition, grpId]</code>
- */
- private static boolean addPartition(
- GridDhtLocalPartition part,
- PartitionAllocationMap map,
- long metaPageAddr,
- PageMetaIO io,
- int grpId,
- int partId,
- int currAllocatedPageCnt,
- long partSize
- ) {
- if (part != null) {
- boolean reserved = part.reserve();
-
- if (!reserved)
- return false;
- }
- else
- assert partId == PageIdAllocator.INDEX_PARTITION : partId;
-
- assert PageIO.getPageId(metaPageAddr) != 0;
-
- int lastAllocatedPageCnt = io.getLastAllocatedPageCount(metaPageAddr);
-
- int curPageCnt = partSize == 0 ? 0 : currAllocatedPageCnt;
-
- map.put(
- new GroupPartitionId(grpId, partId),
- new PagesAllocationRange(lastAllocatedPageCnt, curPageCnt));
-
- return true;
- }
-
/** {@inheritDoc} */
@Override protected void destroyCacheDataStore0(CacheDataStore store) throws IgniteCheckedException {
assert ctx.database() instanceof GridCacheDatabaseSharedManager
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
index b22a6682957..e39607e65f2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/IgniteCacheDatabaseSharedManager.java
@@ -474,18 +474,6 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
};
}
- /**
- * @param memPlcsCfgs User-defined data region configurations.
- */
- private boolean hasCustomDefaultDataRegion(DataRegionConfiguration[] memPlcsCfgs) {
- for (DataRegionConfiguration memPlcsCfg : memPlcsCfgs) {
- if (DFLT_DATA_REG_DEFAULT_NAME.equals(memPlcsCfg.getName()))
- return true;
- }
-
- return false;
- }
-
/**
* @param sysCacheInitSize Initial size of PageMemory to be created for system cache.
* @param sysCacheMaxSize Maximum size of PageMemory to be created for system cache.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/AbstractFreeList.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/AbstractFreeList.java
index 62452095631..83e05562a4d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/AbstractFreeList.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/freelist/AbstractFreeList.java
@@ -759,34 +759,6 @@ public abstract class AbstractFreeList<T extends Storable> extends PagesList imp
return PageIdUtils.changePartitionId(pageId, row.partition());
}
- /**
- * @param row Row.
- * @param reusedPageId Reused page id.
- * @param statHolder Statistics holder to track IO operations.
- * @return Prepared page id.
- *
- * @see PagesList#initReusedPage(long, long, long, int, byte, PageIO)
- */
- private long initReusedPage(T row, long reusedPageId, IoStatisticsHolder statHolder) throws IgniteCheckedException {
- long reusedPage = acquirePage(reusedPageId, statHolder);
- try {
- long reusedPageAddr = writeLock(reusedPageId, reusedPage);
-
- assert reusedPageAddr != 0;
-
- try {
- return initReusedPage(reusedPageId, reusedPage, reusedPageAddr,
- row.partition(), PageIdAllocator.FLAG_DATA, row.ioVersions().latest());
- }
- finally {
- writeUnlock(reusedPageId, reusedPage, reusedPageAddr, true);
- }
- }
- finally {
- releasePage(reusedPageId, reusedPage);
- }
- }
-
/** {@inheritDoc} */
@Override public boolean updateDataRow(long link, T row,
IoStatisticsHolder statHolder) throws IgniteCheckedException {
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java
index 6953b094f21..3ff6550721b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/FullPageIdTable.java
@@ -334,19 +334,6 @@ public class FullPageIdTable implements LoadedPagesMap {
return pageId == REMOVED_PAGE_ID && grpId == REMOVED_CACHE_GRP_ID;
}
- /**
- * @param idx cell index, normalized.
- * @return {@code true} if cell with index idx has state 'Empty'.
- */
- private boolean isRemoved(int idx) {
- long base = entryBase(idx);
-
- int grpId = GridUnsafe.getInt(base);
- long pageId = GridUnsafe.getLong(base + PAGE_ID_OFFSET);
-
- return isRemoved(grpId, pageId);
- }
-
/**
* Sets cell state to 'Removed' or to 'Empty' if next cell is already 'Empty'.
* @param idx cell index, normalized.
@@ -366,30 +353,6 @@ public class FullPageIdTable implements LoadedPagesMap {
return pageId == EMPTY_PAGE_ID && grpId == EMPTY_CACHE_GRP_ID;
}
- /**
- * @param idx cell index, normalized.
- * @return {@code true} if cell with index idx has state 'Empty'.
- */
- private boolean isEmpty(int idx) {
- long base = entryBase(idx);
-
- int grpId = GridUnsafe.getInt(base);
- long pageId = GridUnsafe.getLong(base + PAGE_ID_OFFSET);
-
- return isEmpty(grpId, pageId);
- }
-
- /**
- * Sets cell state to 'Empty'.
- *
- * @param idx cell index, normalized.
- */
- private void setEmpty(int idx) {
- setKeyAt(idx, EMPTY_CACHE_GRP_ID, EMPTY_PAGE_ID);
-
- setValueAt(idx, 0);
- }
-
/**
* @param i index probably outsize internal array of cells.
* @return corresponding index inside cells array.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
index 9913aabd5cf..6508c71da3b 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java
@@ -1771,14 +1771,6 @@ public class PageMemoryImpl implements PageMemoryEx {
return rwLock.isWriteLocked(absPtr + PAGE_LOCK_OFFSET);
}
- /**
- * @param absPtr Absolute pointer to the page.
- * @return {@code True} if read lock acquired for the page.
- */
- boolean isPageReadLocked(long absPtr) {
- return rwLock.isReadLocked(absPtr + PAGE_LOCK_OFFSET);
- }
-
/** {@inheritDoc} */
@Override public String pageLockStateInfo(long absPtr) {
return rwLock.stateInfo(absPtr + PAGE_LOCK_OFFSET);
@@ -2497,21 +2489,6 @@ public class PageMemoryImpl implements PageMemoryEx {
}
}
- /**
- * @param ptr Pointer to update.
- * @param delta Delta.
- */
- private static long updateAtomicLong(long ptr, long delta) {
- while (true) {
- long old = GridUnsafe.getLong(ptr);
-
- long updated = old + delta;
-
- if (GridUnsafe.compareAndSwapLong(null, ptr, old, updated))
- return updated;
- }
- }
-
/**
* Update timestamp for the page and reflect this change to the hot/cold pages histogram.
*
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
index 7cbe82234e9..253cf3e1b71 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/query/GridCacheQueryFutureAdapter.java
@@ -32,8 +32,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.query.reducer.CacheQueryReducer;
import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
import org.apache.ignite.internal.util.future.GridFutureAdapter;
-import org.apache.ignite.internal.util.typedef.C1;
-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.S;
import org.apache.ignite.internal.util.typedef.internal.U;
@@ -320,34 +318,6 @@ public abstract class GridCacheQueryFutureAdapter<K, V, R> extends GridFutureAda
return done;
}
- /**
- * @param col Collection.
- * @return Collection with masked {@code null} values.
- */
- private Collection<Object> maskNulls(Collection<Object> col) {
- assert col != null;
-
- return F.viewReadOnly(col, new C1<Object, Object>() {
- @Override public Object apply(Object e) {
- return e != null ? e : NULL;
- }
- });
- }
-
- /**
- * @param col Collection.
- * @return Collection with unmasked {@code null} values.
- */
- private Collection<Object> unmaskNulls(Collection<Object> col) {
- assert col != null;
-
- return F.viewReadOnly(col, new C1<Object, Object>() {
- @Override public Object apply(Object e) {
- return e != NULL ? e : null;
- }
- });
- }
-
/**
* @param obj Object.
* @return Unmasked object.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
index 572017ca86d..67f96dcdf2c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
@@ -242,13 +242,6 @@ public final class GridCacheAtomicReferenceImpl<T> extends AtomicDataStructurePr
}
}
- /**
- * @return Error.
- */
- private IllegalStateException removedError() {
- return new IllegalStateException("Atomic reference was removed from cache: " + name);
- }
-
/** {@inheritDoc} */
@Override public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject(ctx.kernalContext());
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
index 9966ed66b76..fc0b1771385 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
@@ -257,13 +257,6 @@ public final class GridCacheAtomicStampedImpl<T, S> extends AtomicDataStructureP
}
}
- /**
- * @return Error.
- */
- private IllegalStateException removedError() {
- return new IllegalStateException("Atomic stamped was removed from cache: " + name);
- }
-
/**
*
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/ClientRequestFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/ClientRequestFuture.java
index f7d97328ead..7027b83ff5f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/ClientRequestFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/ClientRequestFuture.java
@@ -131,22 +131,6 @@ final class ClientRequestFuture extends GridFutureAdapter<MappingExchangeResult>
}
}
- /**
- * @param nodeId Node ID.
- * @param res Mapping Request Result.
- */
- void onResponse(UUID nodeId, MappingExchangeResult res) {
- MappingExchangeResult res0 = null;
-
- synchronized (this) {
- if (pendingNode != null && pendingNode.id().equals(nodeId))
- res0 = res;
- }
-
- if (res0 != null)
- onDone(res0);
- }
-
/**
* If left node is actually the one latest mapping request was sent to,
* request is sent again to the next node in topology.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
index 7f5ff0bc376..fe4df2328f4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/cache/PlatformCache.java
@@ -59,7 +59,6 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.topology.Grid
import org.apache.ignite.internal.processors.cache.query.QueryCursorEx;
import org.apache.ignite.internal.processors.platform.PlatformAbstractTarget;
import org.apache.ignite.internal.processors.platform.PlatformContext;
-import org.apache.ignite.internal.processors.platform.PlatformNativeException;
import org.apache.ignite.internal.processors.platform.PlatformTarget;
import org.apache.ignite.internal.processors.platform.cache.expiry.PlatformExpiryPolicy;
import org.apache.ignite.internal.processors.platform.cache.query.PlatformContinuousQuery;
@@ -1336,21 +1335,6 @@ public class PlatformCache extends PlatformAbstractTarget {
}
}
- /**
- * Writes an error to the writer either as a native exception, or as a couple of strings.
- * @param writer Writer.
- * @param ex Exception.
- */
- private static void writeError(BinaryWriterEx writer, Exception ex) {
- if (ex.getCause() instanceof PlatformNativeException)
- writer.writeObjectDetached(((PlatformNativeException)ex.getCause()).cause());
- else {
- writer.writeObjectDetached(ex.getClass().getName());
- writer.writeObjectDetached(ex.getMessage());
- writer.writeObjectDetached(X.getFullStackTrace(ex));
- }
- }
-
/**
* Get lock by id.
*
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
index d9ad3951d57..68d3501764b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
@@ -23,9 +23,7 @@ import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.LinkedHashMap;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -943,26 +941,6 @@ public class PlatformUtils {
obj instanceof BigDecimal[];
}
- /**
- * @param o Object to test.
- * @return True if collection should be recursively unwrapped.
- */
- private static boolean knownCollection(Object o) {
- Class<?> cls = o == null ? null : o.getClass();
-
- return cls == ArrayList.class || cls == LinkedList.class || cls == HashSet.class;
- }
-
- /**
- * @param o Object to test.
- * @return True if map should be recursively unwrapped.
- */
- private static boolean knownMap(Object o) {
- Class<?> cls = o == null ? null : o.getClass();
-
- return cls == HashMap.class || cls == LinkedHashMap.class;
- }
-
/**
* @param col Collection to unwrap.
* @return Unwrapped collection.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteGlobalStatisticsManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteGlobalStatisticsManager.java
index 75199eee2fc..b54b8cd0e49 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteGlobalStatisticsManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/IgniteGlobalStatisticsManager.java
@@ -47,7 +47,6 @@ import org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeMan
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.PartitionsExchangeAware;
import org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor;
-import org.apache.ignite.internal.processors.query.stat.config.StatisticsColumnConfiguration;
import org.apache.ignite.internal.processors.query.stat.config.StatisticsObjectConfiguration;
import org.apache.ignite.internal.processors.query.stat.messages.StatisticsKeyMessage;
import org.apache.ignite.internal.processors.query.stat.messages.StatisticsObjectData;
@@ -494,26 +493,6 @@ public class IgniteGlobalStatisticsManager implements GridMessageListener {
}
}
- /**
- * Test if statistics configuration is fit to all required versions.
- * @param cfg Statistics configuration to check.
- * @param versions Map of column name to required version.
- * @return {@code true} if it is, {@code false} otherwise.
- */
- private boolean checkStatisticsCfg(StatisticsObjectConfiguration cfg, Map<String, Long> versions) {
- if (cfg == null)
- return false;
-
- for (Map.Entry<String, Long> ver : versions.entrySet()) {
- StatisticsColumnConfiguration colCfg = cfg.columns().get(ver.getKey());
-
- if (colCfg == null || colCfg.version() < ver.getValue())
- return false;
- }
-
- return true;
- }
-
/**
* Process incoming request for global statistics. Either response (if it exists), or collect and response
* (if current node is master node for the given key) or ignore (if current node is no more master node for
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsProcessor.java
index dcd4c4bc4e1..7e662e6d29d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/stat/StatisticsProcessor.java
@@ -28,8 +28,6 @@ import java.util.function.Function;
import java.util.function.Supplier;
import org.apache.ignite.IgniteLogger;
import org.apache.ignite.internal.NodeStoppingException;
-import org.apache.ignite.internal.processors.query.stat.config.StatisticsColumnConfiguration;
-import org.apache.ignite.internal.processors.query.stat.config.StatisticsObjectConfiguration;
import org.apache.ignite.internal.processors.query.stat.task.GatherPartitionStatistics;
import org.apache.ignite.internal.thread.pool.IgniteThreadPoolExecutor;
@@ -306,31 +304,6 @@ public class StatisticsProcessor {
}
}
- /**
- * Check if specified object stistic fully meet specified statistics object configuration.
- *
- * @param stat Object statistics to test.
- * @param cfg Statistics object configuration to compare with.
- * @return {@code true} if specified statistics fully meet to specified configuration requiremenrs,
- * {@code false} - otherwise.
- */
- private boolean partStatSuitToConfiguration(ObjectStatisticsImpl stat, StatisticsObjectConfiguration cfg) {
- if (stat == null)
- return false;
-
- if (stat.columnsStatistics().size() != cfg.columns().size())
- return false;
-
- for (StatisticsColumnConfiguration colCfg : cfg.columns().values()) {
- ColumnStatistics colStat = stat.columnStatistics(colCfg.name());
-
- if (colStat == null || colCfg.version() > colStat.version())
- return false;
- }
-
- return true;
- }
-
/**
* Start gathering.
*/
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
index 430bc99ebb3..ebff618efc8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/top/GridTopologyCommandHandler.java
@@ -33,9 +33,7 @@ import org.apache.ignite.cluster.ClusterNode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.GridKernalContext;
import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.processors.port.GridPortRecord;
import org.apache.ignite.internal.processors.rest.GridRestCommand;
-import org.apache.ignite.internal.processors.rest.GridRestProtocol;
import org.apache.ignite.internal.processors.rest.GridRestResponse;
import org.apache.ignite.internal.processors.rest.client.message.GridClientCacheBean;
import org.apache.ignite.internal.processors.rest.client.message.GridClientNodeBean;
@@ -48,7 +46,6 @@ import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.P1;
import org.apache.ignite.internal.util.typedef.internal.S;
import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.spi.IgnitePortProtocol;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_BINARY_CONFIGURATION;
import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_CACHE;
@@ -342,22 +339,6 @@ public class GridTopologyCommandHandler extends GridRestCommandHandlerAdapter {
return attr == null ? dfltVal : attr;
}
- /**
- * Get registered port
- *
- * @param protoCls Protocol class.
- * @param def Default value if such class is not registered.
- * @return Registered port for the protocol class or {@code default value if such class is not registered.
- */
- private int getRegisteredPort(Class<? extends GridRestProtocol> protoCls, int def) {
- for (GridPortRecord r : ctx.ports().records()) {
- if (r.protocol() == IgnitePortProtocol.TCP && protoCls.isAssignableFrom(r.clazz()))
- return r.port();
- }
-
- return def;
- }
-
/** {@inheritDoc} */
@Override public String toString() {
return S.toString(GridTopologyCommandHandler.class, this);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java
index f55b3a2b7c6..2f70eb05f86 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/protocols/tcp/redis/GridRedisProtocolParser.java
@@ -58,9 +58,6 @@ public class GridRedisProtocolParser {
/** Prefix for errors on operations with the wrong type. */
private static final byte[] ERR_TYPE = "WRONGTYPE ".getBytes();
- /** Prefix for errors on authentication. */
- private static final byte[] ERR_AUTH = "NOAUTH ".getBytes();
-
/** Null bulk string for nil response. */
private static final byte[] NIL = "$-1\r\n".getBytes();
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteStopwatch.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteStopwatch.java
index 642756dc56e..ba420a54304 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteStopwatch.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteStopwatch.java
@@ -28,13 +28,7 @@ import org.apache.ignite.IgniteLogger;
import org.apache.ignite.internal.util.lang.IgniteThrowableRunner;
import org.jetbrains.annotations.NotNull;
-import static java.util.concurrent.TimeUnit.DAYS;
-import static java.util.concurrent.TimeUnit.HOURS;
-import static java.util.concurrent.TimeUnit.MICROSECONDS;
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.NANOSECONDS;
-import static java.util.concurrent.TimeUnit.SECONDS;
/**
* An object that measures elapsed time in nanoseconds. It is useful to measure elapsed time using
@@ -254,17 +248,4 @@ public final class IgniteStopwatch {
public Duration elapsed() {
return Duration.ofNanos(elapsedNanos());
}
-
- /**
- * @param nanos Nanos.
- */
- private static TimeUnit chooseUnit(long nanos) {
- if (DAYS.convert(nanos, NANOSECONDS) > 0) return DAYS;
- if (HOURS.convert(nanos, NANOSECONDS) > 0) return HOURS;
- if (MINUTES.convert(nanos, NANOSECONDS) > 0) return MINUTES;
- if (SECONDS.convert(nanos, NANOSECONDS) > 0) return SECONDS;
- if (MILLISECONDS.convert(nanos, NANOSECONDS) > 0) return MILLISECONDS;
- if (MICROSECONDS.convert(nanos, NANOSECONDS) > 0) return MICROSECONDS;
- return NANOSECONDS;
- }
}