Package net.sf.cindy.util

Examples of net.sf.cindy.util.ElapsedTime$SimpleProvider


        public FileTransferHandler(File file) {
            this.file = file;
        }

        public void sessionStarted(Session session) throws Exception {
            elapsedTime = new ElapsedTime();
            if (fc == null)
                fc = new RandomAccessFile(file, "r").getChannel();

            sendName(session);
            sendContent(session);
View Full Code Here


    public boolean complete(int timeout) {
        if (timeout < 0)
            throw new IllegalArgumentException();
        if (!completed) {
            ElapsedTime startTime = new ElapsedTime();
            synchronized (this) {
                while (!completed) {
                    long waitTime = timeout - startTime.getElapsedTime();
                    if (waitTime <= 0)
                        break;
                    dispatcher.block(); // block dispatcher
                    try {
                        wait(waitTime);
View Full Code Here

    private synchronized void start() {
        if (selectThread != null)
            return;

        lastSelectTime = new ElapsedTime();
        try {
            selector = Selector.open();
            selectThread = reactorThreadFactory.newThread(new Runnable() {

                public void run() {
View Full Code Here

TOP

Related Classes of net.sf.cindy.util.ElapsedTime$SimpleProvider

Copyright © 2018 www.massapicom. 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.