Package krati.retention.clock

Examples of krati.retention.clock.Occurred


    public long getOffset(Clock sinceClock) {
        if(_minClock.before(sinceClock) && !sinceClock.after(_maxClock)) {
            int i = 0;
            for(; i < _events.size(); i++) {
                Event<T> e = _events.get(i);
                Occurred occ = sinceClock.compareTo(e.getClock());
                if(occ == Occurred.EQUICONCURRENTLY) {
                    break;
                } else if(occ == Occurred.BEFORE || occ == Occurred.CONCURRENTLY) {
                    i--;
                    break;
View Full Code Here


   
    @Override
    public Position getPosition(Clock sinceClock) {
        long sinceOffset;
       
        Occurred occ = sinceClock.compareTo(getMinClock());
        if(occ == Occurred.EQUICONCURRENTLY) {
            return new SimplePosition(getId(), getOrigin(), getMinClock());
        }
       
        if(occ == Occurred.BEFORE || occ == Occurred.CONCURRENTLY) {
View Full Code Here

TOP

Related Classes of krati.retention.clock.Occurred

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.