Package com.persistit.exception

Examples of com.persistit.exception.TaskEndedException


        if (_expirationTime == 0)
            _expirationTime = Long.MAX_VALUE;

        if (now - _suspendedDuration > _expirationTime) {
            _state = STATE_EXPIRED;
            throw new TaskEndedException("Expired");
        }
        if (_stop.get()) {
            _state = STATE_ENDED;
            throw new TaskEndedException("Stopped");
        }
        if (_suspend.get()) {
            while (_suspend.get()) {
                if (_stop.get()) {
                    _state = STATE_ENDED;
                    throw new TaskEndedException("Stopped");
                }
                _state = STATE_SUSPENDED;
                try {
                    Util.sleep(Persistit.SHORT_DELAY);
                } catch (final PersistitInterruptedException ie) {
                    throw new TaskEndedException("Interrupted");
                }
            }
            _suspendedDuration += (System.currentTimeMillis() - now);
            _state = STATE_RUNNING;
        }
View Full Code Here


        if (_expirationTime == 0)
            _expirationTime = Long.MAX_VALUE;

        if (now - _suspendedDuration > _expirationTime) {
            _state = STATE_EXPIRED;
            throw new TaskEndedException("Expired");
        }
        if (_stop.get()) {
            _state = STATE_ENDED;
            throw new TaskEndedException("Stopped");
        }
        if (_suspend.get()) {
            while (_suspend.get()) {
                if (_stop.get()) {
                    _state = STATE_ENDED;
                    throw new TaskEndedException("Stopped");
                }
                _state = STATE_SUSPENDED;
                try {
                    Util.sleep(Persistit.SHORT_DELAY);
                } catch (final PersistitInterruptedException ie) {
                    throw new TaskEndedException("Interrupted");
                }
            }
            _suspendedDuration += (System.currentTimeMillis() - now);
            _state = STATE_RUNNING;
        }
View Full Code Here

        if (_expirationTime == 0)
            _expirationTime = Long.MAX_VALUE;

        if (now - _suspendedDuration > _expirationTime) {
            _state = STATE_EXPIRED;
            throw new TaskEndedException("Expired");
        }
        if (_stop.get()) {
            _state = STATE_ENDED;
            throw new TaskEndedException("Stopped");
        }
        if (_suspend.get()) {
            while (_suspend.get()) {
                if (_stop.get()) {
                    _state = STATE_ENDED;
                    throw new TaskEndedException("Stopped");
                }
                _state = STATE_SUSPENDED;
                try {
                    Util.sleep(Persistit.SHORT_DELAY);
                } catch (PersistitInterruptedException ie) {
                    throw new TaskEndedException("Interrupted");
                }
            }
            _suspendedDuration += (System.currentTimeMillis() - now);
            _state = STATE_RUNNING;
        }
View Full Code Here

        if (_expirationTime == 0)
            _expirationTime = Long.MAX_VALUE;

        if (now - _suspendedDuration > _expirationTime) {
            _state = STATE_EXPIRED;
            throw new TaskEndedException("Expired");
        }
        if (_stop.get()) {
            _state = STATE_ENDED;
            throw new TaskEndedException("Stopped");
        }
        if (_suspend.get()) {
            while (_suspend.get()) {
                if (_stop.get()) {
                    _state = STATE_ENDED;
                    throw new TaskEndedException("Stopped");
                }
                _state = STATE_SUSPENDED;
                try {
                    Util.sleep(Persistit.SHORT_DELAY);
                } catch (final PersistitInterruptedException ie) {
                    throw new TaskEndedException("Interrupted");
                }
            }
            _suspendedDuration += (System.currentTimeMillis() - now);
            _state = STATE_RUNNING;
        }
View Full Code Here

TOP

Related Classes of com.persistit.exception.TaskEndedException

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.