Package EDU.oswego.cs.dl.util.concurrent

Examples of EDU.oswego.cs.dl.util.concurrent.FutureResult.peek()


        try {
            if (timeout < 0) {
                return (Message) future.get();
            }
            else if (timeout == 0) {
                return (Message) future.peek();
            }
            else {
                return (Message) future.timedGet(timeout);
            }
        }
View Full Code Here


            return;
        }
        synchronized (results) {
            for (int i = 0; i < results.length; i++) {
                FutureResult result = results[i];
                if ( null == result.peek() ) {
                    result.set(aResult);
                    break;
                }
            }
        }
View Full Code Here

        RequestID id = (RequestID) anID;
        FutureResult[] results;
        results = (FutureResult[]) responses.get(id.id);
        for (int i = 0; i < results.length; i++) {
            FutureResult result = results[i];
            if ( null == result.peek() ) {
                result.set(aResult);
                break;
            }
        }
    }
View Full Code Here

            return;
        }
        synchronized (results) {
            for (int i = 0; i < results.length; i++) {
                FutureResult result = results[i];
                if ( null == result.peek() ) {
                    result.set(aResult);
                    break;
                }
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.