This is an automated email from the ASF dual-hosted git repository.

namelchev 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 55ec68d4ad1 IGNITE-28534 Remove unused code (#13016)
55ec68d4ad1 is described below

commit 55ec68d4ad14c7e2fe38fc05255917a06cf5f49b
Author: Nikita Amelchev <[email protected]>
AuthorDate: Wed Apr 15 12:49:01 2026 +0300

    IGNITE-28534 Remove unused code (#13016)
---
 .../apache/ignite/internal/GridProxyListener.java  |  51 ----
 .../marshaller/optimized/package-info.java         |  23 --
 .../query/schema/SchemaIndexCacheFilter.java       |  33 ---
 .../client/message/GridClientBinaryMetaData.java   |  71 -----
 .../internal/util/GridAtomicInitializer.java       | 113 --------
 .../apache/ignite/internal/util/GridKeyLock.java   | 153 -----------
 .../internal/util/lang/GridPlainAbsClosure.java    |  33 ---
 .../internal/util/test/GridTestPrintStream.java    | 298 ---------------------
 .../util/test/GridTestPrintStreamFactory.java      | 128 ---------
 .../ignite/internal/util/test/package-info.java    |  23 --
 .../util/worker/GridWorkerListenerAdapter.java     |  38 ---
 .../binary/TestCachingMetadataHandler.java         |  67 -----
 .../apache/ignite/p2p/GridSwapSpaceCustomKey.java  |  58 ----
 .../ignite/p2p/GridSwapSpaceCustomValue.java       |  64 -----
 .../spi/discovery/AbstractDiscoveryTest.java       | 157 -----------
 .../schedule/GridScheduleStatistics.java           |   0
 16 files changed, 1310 deletions(-)

diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/GridProxyListener.java 
b/modules/core/src/main/java/org/apache/ignite/internal/GridProxyListener.java
deleted file mode 100644
index 4692322ae46..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/GridProxyListener.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal;
-
-import java.util.EventListener;
-
-/**
- * Interception listener is notified about method apply. For each intercepted 
method
- * apply the listener will be called twice - before and after the apply.
- * <p>
- * Method {@link #beforeCall(Class, String, Object[])} is called right before 
the
- * traceable method and the second apply {@link #afterCall(Class, String, 
Object[], Object, Throwable)}
- * is made to get invocation result and exception, if there was one.
- */
-public interface GridProxyListener extends EventListener {
-    /**
-     * Method is called right before the traced method.
-     *
-     * @param cls Callee class.
-     * @param mtdName Callee method name.
-     * @param args Callee method parameters.
-     */
-    public void beforeCall(Class<?> cls, String mtdName, Object[] args);
-
-    /**
-     * Method is called right after the traced method.
-     *
-     * @param cls Callee class.
-     * @param mtdName Callee method name.
-     * @param args Callee method parameters.
-     * @param res Call result. Might be {@code null} if apply
-     *      returned {@code null} or if exception happened.
-     * @param e Exception thrown by given method apply, if any. Can be {@code 
null}.
-     */
-    public void afterCall(Class<?> cls, String mtdName, Object[] args, Object 
res, Throwable e);
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/marshaller/optimized/package-info.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/marshaller/optimized/package-info.java
deleted file mode 100644
index fe9c637f80c..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/marshaller/optimized/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * <!-- Package description. -->
- * Contains Optimized marshaller.
- */
-
-package org.apache.ignite.internal.marshaller.optimized;
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/SchemaIndexCacheFilter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/SchemaIndexCacheFilter.java
deleted file mode 100644
index 32600c6c801..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/SchemaIndexCacheFilter.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.query.schema;
-
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
-
-/**
- * Index row filter accepting current entry.
- */
-public interface SchemaIndexCacheFilter {
-    /**
-     * @param row Cache data row.
-     * @return {@code True} if row passes the filter.
-     * @throws IgniteCheckedException If failed.
-     */
-    boolean apply(CacheDataRow row) throws IgniteCheckedException;
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientBinaryMetaData.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientBinaryMetaData.java
deleted file mode 100644
index f1fd99c627d..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/client/message/GridClientBinaryMetaData.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.processors.rest.client.message;
-
-import java.util.Map;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- * Binary meta data sent from client.
- */
-public class GridClientBinaryMetaData {
-    /** */
-    private int typeId;
-
-    /** */
-    private String typeName;
-
-    /** */
-    private Map<String, Integer> fields;
-
-    /** */
-    private String affKeyFieldName;
-
-    /**
-     * @return Type ID.
-     */
-    public int typeId() {
-        return typeId;
-    }
-
-    /**
-     * @return Type name.
-     */
-    public String typeName() {
-        return typeName;
-    }
-
-    /**
-     * @return Fields.
-     */
-    public Map<String, Integer> fields() {
-        return fields;
-    }
-
-    /**
-     * @return Affinity key field name.
-     */
-    public String affinityKeyFieldName() {
-        return affKeyFieldName;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridClientBinaryMetaData.class, this);
-    }
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridAtomicInitializer.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridAtomicInitializer.java
deleted file mode 100644
index 8d4d8c00206..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridAtomicInitializer.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util;
-
-import java.util.concurrent.Callable;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.IgniteInterruptedCheckedException;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.internal.util.typedef.internal.U;
-
-/**
- * Executes initialization operation once.
- */
-public class GridAtomicInitializer<T> {
-    /** */
-    private final Object mux = new Object();
-
-    /** */
-    private volatile boolean finished;
-
-    /** Don't use volatile because we write this field before 'finished' write 
and read after 'finished' read. */
-    @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
-    private Exception e;
-
-    /** Don't use volatile because we write this field before 'finished' write 
and read after 'finished' read. */
-    @SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized")
-    private T res;
-
-    /**
-     * Executes initialization operation only once.
-     *
-     * @param c Initialization operation.
-     * @return Result of initialization.
-     * @throws IgniteCheckedException If failed.
-     */
-    public T init(Callable<T> c) throws IgniteCheckedException {
-        if (!finished) {
-            synchronized (mux) {
-                if (!finished) {
-                    try {
-                        res = c.call();
-                    }
-                    catch (Exception e) {
-                        this.e = e;
-                    }
-                    finally {
-                        finished = true;
-
-                        mux.notifyAll();
-                    }
-                }
-            }
-        }
-
-        if (e != null)
-            throw e instanceof IgniteCheckedException ? 
(IgniteCheckedException)e : new IgniteCheckedException(e);
-
-        return res;
-    }
-
-    /**
-     * @return True, if initialization was already successfully completed.
-     */
-    public boolean succeeded() {
-        return finished && e == null;
-    }
-
-    /**
-     * Should be called only if succeeded.
-     *
-     * @return Result.
-     */
-    public T result() {
-        return res;
-    }
-
-    /**
-     * Await for completion.
-     *
-     * @return {@code true} If initialization was completed successfully.
-     * @throws IgniteInterruptedCheckedException If thread was interrupted.
-     */
-    public boolean await() throws IgniteInterruptedCheckedException {
-        if (!finished) {
-            synchronized (mux) {
-                while (!finished)
-                    U.wait(mux);
-            }
-        }
-
-        return e == null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridAtomicInitializer.class, this);
-    }
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridKeyLock.java 
b/modules/core/src/main/java/org/apache/ignite/internal/util/GridKeyLock.java
deleted file mode 100644
index 5976cde1271..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/GridKeyLock.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util;
-
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * This is an utility class for 'splitting' locking of some resources.
- * <p>
- * Map resources values to some number of locks,
- * and supply convenience methods to obtain and release these locks using key 
values.
- */
-public class GridKeyLock {
-    /** Underlying locks. */
-    private final ConcurrentMap<Object, Sync> locks = new 
ConcurrentHashMap<>();
-
-    /**
-     * @param key Key to lock.
-     * @return Sync object that should be passed to {@link #unlock(Object, 
Object)} method.
-     * @throws InterruptedException If interrupted while acquiring lock.
-     */
-    public <T> Object lockInterruptibly(T key) throws InterruptedException {
-        assert key != null;
-
-        Sync t = new Sync();
-
-        while (true) {
-            Sync old = locks.putIfAbsent(key, t);
-
-            if (old != null)
-                old.await();
-            else
-                return t;
-        }
-    }
-
-    /**
-     * @param key Key to lock.
-     * @return Sync object that should be passed to {@link #unlock(Object, 
Object)} method.
-     */
-    public <T> Object lock(T key) {
-        assert key != null;
-
-        boolean interrupted = false;
-
-        Sync t = new Sync();
-
-        try {
-            while (true) {
-                Sync old = locks.putIfAbsent(key, t);
-
-                if (old != null) {
-                    while (true) {
-                        try {
-                            old.await();
-
-                            break;
-                        }
-                        catch (InterruptedException ignored) {
-                            interrupted = true;
-                        }
-                    }
-                }
-                else
-                    return t;
-            }
-        }
-        finally {
-            if (interrupted)
-                Thread.currentThread().interrupt();
-        }
-    }
-
-    /**
-     * @param key Key to lock.
-     * @return Sync object that should be passed to {@link #unlock(Object, 
Object)} method or
-     *      {@code null} if try lock failed.
-     */
-    @Nullable public <T> Object tryLock(T key) {
-        assert key != null;
-
-        Sync t = new Sync();
-
-        Sync old = locks.putIfAbsent(key, t);
-
-        return old != null ? null : t;
-    }
-
-    /**
-     * @param key Key.
-     * @param sync Sync that got from {@link #lockInterruptibly(Object)} call.
-     */
-    public <T> void unlock(T key, Object sync) {
-        if (!locks.remove(key, sync))
-            throw new IllegalStateException("Lock has not been acquired for 
key: " + key);
-
-        ((Sync)sync).finish();
-    }
-
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridKeyLock.class, this, "locksSize", locks.size());
-    }
-
-    /**
-     *
-     */
-    private static class Sync {
-        /** */
-        private volatile boolean finished;
-
-        /**
-         * @throws InterruptedException If failed.
-         */
-        void await() throws InterruptedException {
-            if (finished)
-                return;
-
-            synchronized (this) {
-                while (!finished)
-                    wait();
-            }
-        }
-
-        /**
-         *
-         */
-        synchronized void finish() {
-            finished = true;
-
-            notifyAll();
-        }
-    }
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridPlainAbsClosure.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridPlainAbsClosure.java
deleted file mode 100644
index 8da480c92d9..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridPlainAbsClosure.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util.lang;
-
-import org.apache.ignite.IgniteCheckedException;
-
-/**
- * Plain closure that does not accept any arguments, returns nothing and do 
not implement
- * peer deploy aware.
- */
-public interface GridPlainAbsClosure {
-    /**
-     * Applies this closure.
-     *
-     * @throws IgniteCheckedException If error occurred.
-     */
-    public void apply() throws IgniteCheckedException;
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/test/GridTestPrintStream.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/test/GridTestPrintStream.java
deleted file mode 100644
index 855f9757e69..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/test/GridTestPrintStream.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util.test;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * Print stream that prints each thread group into a separate buffer. Use
- * any of the {@code purge(...)} methods to print the contents of the buffer
- * to the parent base stream or to a stream of your choice.
- */
-public class GridTestPrintStream extends PrintStream {
-    /** */
-    private final Map<ThreadGroup, BytePrintStream> streams = new HashMap<>();
-
-    /** */
-    private final ThreadGroup baseGrp;
-
-    /**
-     * Creates test print stream around the base stream passed in.
-     * Root thread group is the parent of current thread group.
-     *
-     * @param out Base print stream.
-     */
-    public GridTestPrintStream(PrintStream out) {
-        super(out);
-
-        baseGrp = Thread.currentThread().getThreadGroup().getParent();
-    }
-
-    /**
-     * Creates test print stream around the base stream passed in also
-     * specifying root thread group.
-     *
-     * @param out Base print stream.
-     * @param baseGrp Thread group.
-     */
-    public GridTestPrintStream(PrintStream out, ThreadGroup baseGrp) {
-        super(out);
-
-        assert baseGrp != null;
-
-        this.baseGrp = baseGrp;
-    }
-
-    /**
-     * Gets print stream for current thread group.
-     *
-     * @param release Whether or not to clear all the memory associated with 
thread group.
-     * @return Gets {@link PrintStream} for current thread group.
-     */
-    private BytePrintStream out(boolean release) {
-        BytePrintStream out;
-
-        synchronized (streams) {
-            ThreadGroup grp = Thread.currentThread().getThreadGroup();
-
-            while (grp != null && grp.getParent() != baseGrp)
-                grp = grp.getParent();
-
-            out = release ? streams.remove(grp) : streams.get(grp);
-
-            if (out == null) {
-                if (release)
-                    return new BytePrintStream();
-
-                streams.put(grp, out = new BytePrintStream());
-            }
-
-            return out;
-        }
-    }
-
-    /**
-     * Purges print stream for this thread group to parent print stream.
-     *
-     * @throws IOException If any error happened.
-     */
-    public void purge() throws IOException {
-        out(true).writeTo(out);
-    }
-
-    /**
-     * Purges print stream for this thread group to the stream passed in.
-     *
-     * @param out Stream to purge to.
-     * @throws IOException If any error happened.
-     */
-    public void purge(OutputStream out) throws IOException {
-        out(true).writeTo(out);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println() {
-        out(false).println();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(char c) {
-        out(false).print(c);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(char x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(double d) {
-        out(false).print(d);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(double x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(float f) {
-        out(false).print(f);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(float x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(int i) {
-        out(false).print(i);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(int x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(long l) {
-        out(false).print(l);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(long x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(boolean b) {
-        out(false).print(b);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(boolean x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(char[] s) {
-        out(false).print(s);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(char[] x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(Object obj) {
-        out(false).print(obj);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(Object x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void print(String s) {
-        out(false).print(s);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void println(String x) {
-        out(false).println(x);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void write(byte[] buf, int off, int len) {
-        out(false).write(buf, off, len);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void close() {
-        out(false).close();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void flush() {
-        out(false).flush();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void write(int b) {
-        out(false).write(b);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void write(byte[] b) throws IOException {
-        out(false).write(b);
-    }
-
-    /** {@inheritDoc} */
-    @Override public PrintStream append(CharSequence csq) {
-        return out(false).append(csq);
-    }
-
-    /** {@inheritDoc} */
-    @Override public PrintStream append(CharSequence csq, int start, int end) {
-        return out(false).append(csq, start, end);
-    }
-
-    /** {@inheritDoc} */
-    @Override public PrintStream append(char c) {
-        return out(false).append(c);
-    }
-
-    /** {@inheritDoc} */
-    @Override public PrintStream printf(String format, Object... args) {
-        return out(false).printf(format, args);
-    }
-
-    /** {@inheritDoc} */
-    @Override public PrintStream printf(Locale l, String format, Object... 
args) {
-        return out(false).printf(l, format, args);
-    }
-
-    /** {@inheritDoc} */
-    @Override public PrintStream format(String format, Object... args) {
-        return out(false).format(format, args);
-    }
-
-    /** {@inheritDoc} */
-    @Override public PrintStream format(Locale l, String format, Object... 
args) {
-        return out(false).format(l, format, args);
-    }
-
-    /**
-     * Wrapper around print stream that allows purging to any print stream.
-     */
-    private static class BytePrintStream extends PrintStream {
-        /**
-         * Default constructor.
-         */
-        BytePrintStream() {
-            super(new ByteArrayOutputStream());
-        }
-
-        /**
-         * Writes contents of the internal byte array stream to the stream 
passed
-         * in.
-         *
-         * @param out Stream to write to.
-         * @throws IOException If any error happened.
-         */
-        void writeTo(OutputStream out) throws IOException {
-            flush();
-
-            ByteArrayOutputStream byteOut = (ByteArrayOutputStream)this.out;
-
-            byteOut.writeTo(out);
-
-            // Go back to beginning.
-            byteOut.reset();
-        }
-    }
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/test/GridTestPrintStreamFactory.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/test/GridTestPrintStreamFactory.java
deleted file mode 100644
index 20d24c5c262..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/test/GridTestPrintStreamFactory.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util.test;
-
-import java.io.PrintStream;
-
-/**
- * Factory that allow to acquire/release Print Stream for test logging.
- */
-public final class GridTestPrintStreamFactory {
-    /** */
-    private static final PrintStream sysOut = System.out;
-
-    /** */
-    private static final PrintStream sysErr = System.err;
-
-    /** */
-    private static GridTestPrintStream testOut;
-
-    /** */
-    private static GridTestPrintStream testErr;
-
-    /** */
-    private static long outCnt = 0;
-
-    /** */
-    private static long errCnt = 0;
-
-    /**
-     * Enforces singleton.
-     */
-    private GridTestPrintStreamFactory() {
-        // No-op.
-    }
-
-    /**
-     * Gets original standard out.
-     *
-     * @return Original standard out.
-     */
-    public static synchronized PrintStream getStdOut() {
-        return sysOut;
-    }
-
-    /**
-     * Gets original standard error.
-     *
-     * @return Original standard error.
-     */
-    public static synchronized PrintStream getStdErr() {
-        return sysErr;
-    }
-
-    /**
-     * Acquires output stream for logging tests.
-     *
-     * @return Junit out print stream.
-     */
-    public static synchronized GridTestPrintStream acquireOut() {
-        // Lazy initialization is required here to ensure that parent
-        // thread group is picked off correctly by implementation.
-        if (testOut == null)
-            testOut = new GridTestPrintStream(sysOut);
-
-        if (outCnt == 0)
-            System.setOut(testOut);
-
-        outCnt++;
-
-        return testOut;
-    }
-
-    /**
-     * Acquires output stream for logging errors in tests.
-     *
-     * @return Junit error print stream.
-     */
-    public static synchronized GridTestPrintStream acquireErr() {
-        // Lazy initialization is required here to ensure that parent
-        // thread group is picked off correctly by implementation.
-        if (testErr == null)
-            testErr = new GridTestPrintStream(sysErr);
-
-        if (errCnt == 0)
-            System.setErr(testErr);
-
-        errCnt++;
-
-        return testErr;
-    }
-
-    /**
-     * Releases standard out. If there are no more acquired standard outs,
-     * then it is reset to its original value.
-     */
-    public static synchronized void releaseOut() {
-        outCnt--;
-
-        if (outCnt == 0)
-            System.setOut(sysOut);
-    }
-
-    /**
-     * Releases standard error. If there are no more acquired standard errors,
-     * then it is reset to its original value.
-     */
-    public static synchronized void releaseErr() {
-        errCnt--;
-
-        if (errCnt == 0)
-            System.setErr(sysErr);
-    }
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/test/package-info.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/test/package-info.java
deleted file mode 100644
index 8135a6b920f..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/test/package-info.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * <!-- Package description. -->
- * Contains common utility classes for JUnit integration.
- */
-
-package org.apache.ignite.internal.util.test;
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/util/worker/GridWorkerListenerAdapter.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/util/worker/GridWorkerListenerAdapter.java
deleted file mode 100644
index 644021266b2..00000000000
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/util/worker/GridWorkerListenerAdapter.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.util.worker;
-
-/**
- * Convenience adapter for {@link GridWorkerListener}.
- */
-public class GridWorkerListenerAdapter implements GridWorkerListener {
-    /** {@inheritDoc} */
-    @Override public void onStarted(GridWorker w) {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void onStopped(GridWorker w) {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public void onIdle(GridWorker w) {
-        // No-op.
-    }
-}
diff --git 
a/modules/core/src/test/java/org/apache/ignite/internal/binary/TestCachingMetadataHandler.java
 
b/modules/core/src/test/java/org/apache/ignite/internal/binary/TestCachingMetadataHandler.java
deleted file mode 100644
index a44b0a42bcc..00000000000
--- 
a/modules/core/src/test/java/org/apache/ignite/internal/binary/TestCachingMetadataHandler.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.internal.binary;
-
-import java.util.Collection;
-import java.util.concurrent.ConcurrentHashMap;
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryType;
-
-/**
- * Test metadata handler.
- */
-public class TestCachingMetadataHandler implements BinaryMetadataHandler {
-    /** Cached metadatas. */
-    private final ConcurrentHashMap<Integer, BinaryType> metas = new 
ConcurrentHashMap<>();
-
-    /** {@inheritDoc} */
-    @Override public void addMeta(int typeId, BinaryType meta, boolean 
failIfUnregistered)
-        throws BinaryObjectException {
-        BinaryType otherType = metas.put(typeId, meta);
-
-        if (otherType != null)
-            throw new IllegalStateException("Metadata replacement is not 
allowed in " +
-                TestCachingMetadataHandler.class.getSimpleName() + '.');
-    }
-
-    /** {@inheritDoc} */
-    @Override public void addMetaLocally(int typeId, BinaryType meta, boolean 
failIfUnregistered)
-        throws BinaryObjectException {
-        addMeta(typeId, meta, failIfUnregistered);
-    }
-
-    /** {@inheritDoc} */
-    @Override public BinaryType metadata(int typeId) throws 
BinaryObjectException {
-        return metas.get(typeId);
-    }
-
-    /** {@inheritDoc} */
-    @Override public BinaryMetadata metadata0(int typeId) throws 
BinaryObjectException {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public BinaryType metadata(int typeId, int schemaId) throws 
BinaryObjectException {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Collection<BinaryType> metadata() throws 
BinaryObjectException {
-        return metas.values();
-    }
-}
diff --git 
a/modules/core/src/test/java/org/apache/ignite/p2p/GridSwapSpaceCustomKey.java 
b/modules/core/src/test/java/org/apache/ignite/p2p/GridSwapSpaceCustomKey.java
deleted file mode 100644
index 8d3bf544e4c..00000000000
--- 
a/modules/core/src/test/java/org/apache/ignite/p2p/GridSwapSpaceCustomKey.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.p2p;
-
-import java.io.Serializable;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- */
-public class GridSwapSpaceCustomKey implements Serializable {
-    /** */
-    private long id = -1;
-
-    /**
-     * @return ID.
-     */
-    public long getId() {
-        return id;
-    }
-
-    /**
-     *
-     * @param id ID.
-     */
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object obj) {
-        return obj instanceof GridSwapSpaceCustomKey && 
((GridSwapSpaceCustomKey)obj).id == id;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        return Long.valueOf(id).hashCode();
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridSwapSpaceCustomKey.class, this);
-    }
-}
diff --git 
a/modules/core/src/test/java/org/apache/ignite/p2p/GridSwapSpaceCustomValue.java
 
b/modules/core/src/test/java/org/apache/ignite/p2p/GridSwapSpaceCustomValue.java
deleted file mode 100644
index d3bb9259a05..00000000000
--- 
a/modules/core/src/test/java/org/apache/ignite/p2p/GridSwapSpaceCustomValue.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.p2p;
-
-import java.io.Serializable;
-import org.apache.ignite.internal.util.typedef.internal.S;
-
-/**
- */
-public class GridSwapSpaceCustomValue implements Serializable {
-    /** */
-    private long id = -1;
-
-    /** */
-    private String data;
-
-    /**
-     * @return ID.
-     */
-    public long getId() {
-        return id;
-    }
-
-    /**
-     * @param id ID.
-     */
-    public void setId(long id) {
-        this.id = id;
-    }
-
-    /**
-     * @return Data.
-     */
-    public String getData() {
-        return data;
-    }
-
-    /**
-     * @param data Data.
-     */
-    public void setData(String data) {
-        this.data = data;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridSwapSpaceCustomValue.class, this);
-    }
-}
diff --git 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java
 
b/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java
deleted file mode 100644
index e392fc77a92..00000000000
--- 
a/modules/core/src/test/java/org/apache/ignite/spi/discovery/AbstractDiscoveryTest.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.spi.discovery;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-import java.util.UUID;
-import javax.swing.JOptionPane;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
-import org.apache.ignite.testframework.junits.spi.GridSpiAbstractTest;
-import org.junit.Test;
-
-/**
- * Base discovery test class.
- * @param <T> SPI implementation class.
- */
-public abstract class AbstractDiscoveryTest<T extends DiscoverySpi> extends 
GridSpiAbstractTest<T> {
-    /** */
-    @SuppressWarnings({"ClassExplicitlyExtendsThread"})
-    private class Pinger extends Thread {
-        /** */
-        private final Object mux = new Object();
-
-        /** */
-        @SuppressWarnings({"FieldAccessedSynchronizedAndUnsynchronized"})
-        private boolean isCanceled;
-
-        /** {@inheritDoc} */
-        @Override public void run() {
-            Random rnd = new Random();
-
-            while (isCanceled) {
-                try {
-                    Collection<ClusterNode> nodes = getSpi().getRemoteNodes();
-
-                    pingNode(UUID.randomUUID(), false);
-
-                    for (ClusterNode item : nodes) {
-                        pingNode(item.id(), true);
-                    }
-
-                    pingNode(UUID.randomUUID(), false);
-                }
-                catch (Exception e) {
-                    error("Can't get SPI.", e);
-                }
-
-                synchronized (mux) {
-                    if (isCanceled) {
-                        try {
-                            mux.wait(getPingFrequency() * (1 + 
rnd.nextInt(10)));
-                        }
-                        catch (InterruptedException e) {
-                            //No-op.
-                        }
-                    }
-                }
-            }
-        }
-
-        /**
-         * @param nodeId Node UUID.
-         * @param exists Exists flag.
-         * @throws Exception If failed.
-         */
-        private void pingNode(UUID nodeId, boolean exists) throws Exception {
-            boolean flag = getSpi().pingNode(nodeId);
-
-            info((flag != exists ? "***Error*** " : "") + "Ping " + (exists ? 
"exist" : "random") +
-                " node [nodeId=" + nodeId + ", pingResult=" + flag + ']');
-        }
-
-        /** {@inheritDoc} */
-        @Override public void interrupt() {
-            synchronized (mux) {
-                isCanceled = true;
-
-                mux.notifyAll();
-            }
-
-            super.interrupt();
-        }
-    }
-
-    /**
-     * @return Ping frequency.
-     */
-    public abstract long getPingFrequency();
-
-    /**
-     * @return Pinger start flag.
-     */
-    public boolean isPingerStart() {
-        return true;
-    }
-
-    /** */
-    private class DiscoveryListener implements GridLocalEventListener {
-        /** {@inheritDoc} */
-        @Override public void onEvent(Event evt) {
-            info("Discovery event [event=" + evt + ']');
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    @Test
-    public void testDiscovery() throws Exception {
-        GridLocalEventListener discoLsnr = new DiscoveryListener();
-
-        getSpiContext().addLocalEventListener(discoLsnr);
-
-        Pinger pinger = null;
-
-        if (isPingerStart()) {
-            pinger = new Pinger();
-
-            pinger.start();
-        }
-
-        JOptionPane.showMessageDialog(null, "Press OK to end test.");
-
-        if (pinger != null)
-            pinger.interrupt();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected Map<String, Serializable> getNodeAttributes() {
-        Map<String, Serializable> attrs = new HashMap<>(1);
-
-        attrs.put("testDiscoveryAttribute", new Date());
-
-        return attrs;
-    }
-}
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/schedule/GridScheduleStatistics.java
 
b/modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/GridScheduleStatistics.java
similarity index 100%
rename from 
modules/core/src/main/java/org/apache/ignite/internal/processors/schedule/GridScheduleStatistics.java
rename to 
modules/schedule/src/main/java/org/apache/ignite/internal/processors/schedule/GridScheduleStatistics.java


Reply via email to