diff --git a/pom.xml b/pom.xml
index 6aceccf..bcacfec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,6 +69,38 @@
true
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.2.1
+
+
+ attach-sources
+ package
+
+ jar
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.2.0
+
+
+
+ attach-javadocs
+ package
+
+ jar
+
+
+
+
+
org.apache.maven.plugins
maven-surefire-plugin
diff --git a/src/main/java/ua/net/uid/utils/concurrent/Promise.java b/src/main/java/ua/net/uid/utils/concurrent/Promise.java
deleted file mode 100644
index 556c5f3..0000000
--- a/src/main/java/ua/net/uid/utils/concurrent/Promise.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*
- * Copyright 2020 nightfall.
- *
- * Licensed 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 ua.net.uid.utils.concurrent;
-
-import java.util.Queue;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ForkJoinPool;
-import java.util.concurrent.ForkJoinTask;
-import ua.net.uid.utils.Function;
-
-/**
- * !WIP! not for use
- *
- * @author nightfall
- * @param
- */
-public class Promise {
- ////////////////////////////////////////////////////////////////////////////
- public enum State { PENDING, FULFILLED, REJECTED }
- ////////////////////////////////////////////////////////////////////////////
- public interface Resolver {
- void accept(V value);
- void reject(Throwable error);
- }
- public interface Performer {
- void apply(Resolver resolver) throws Throwable;
- }
- ////////////////////////////////////////////////////////////////////////////
- public static Promise resolve(V value) {
- return new Promise<>(value, 0);
- }
- public static Promise reject(Throwable error) {
- return new Promise<>(error, false);
- }
- ////////////////////////////////////////////////////////////////////////////
- /*
- public static Promise> all(Promise extends E> ... promises) {
- return all(Arrays.asList(promises));
- }
- public static Promise> all(Iterable extends Promise extends E>> promises) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- public static Promise> allSettled(Promise extends E> ... promises) {
- return allSettled(Arrays.asList(promises));
- }
- public static Promise> allSettled(Iterable extends Promise extends E>> promises) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- public static Promise> any(Promise extends E> ... promises) {
- return any(Arrays.asList(promises));
- }
- public static Promise> any(Iterable extends Promise extends E>> promises) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
-
- public static Promise> race(Promise extends E> ... promises) {
- return race(Arrays.asList(promises));
- }
- public static Promise> race(Iterable extends Promise extends E>> promises) {
- throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
- }
- */
- ////////////////////////////////////////////////////////////////////////////
- private volatile Internal internal;
- ////////////////////////////////////////////////////////////////////////////
- private Promise(V value, int any) {
- internal = new Fulfilled(value);
- }
- private Promise(Throwable error, boolean any) {
- internal = new Rejected(error);
- }
-
- public Promise(Callable extends V> task) {
- this((resolver) -> {
- try {
- resolver.accept(task.call());
- } catch (Throwable ex) {
- resolver.reject(ex);
- }
- });
- }
- public Promise(Performer performer) {
- internal = new Pending(performer);
- internal.run();
- }
- ////////////////////////////////////////////////////////////////////////////
- public State getState() {
- return internal.getState();
- }
- public V getValue() {
- internal.sync();
- return internal.getValue();
- }
- public Throwable getError() {
- internal.sync();
- return internal.getError();
- }
- public Promise sync() {
- internal.sync();
- return this;
- }
- public Promise then(Function callback) {
- return internal.then(callback);
- }
- public Promise then(U value) {
- return internal.then(value);
- }
- public Promise except(Function callback) {
- return internal.except(callback);
- }
- public Promise except(U value) {
- return internal.except(value);
- }
- public Promise anyway(Function