private OnlyFirstRequest retrieveFirstRequestObserver() {

        int key = warpContext().hashCode();

        int[] stampHolder = new int[1];
        OnlyFirstRequest onlyFirstRequest = firstRequestObserver.get(stampHolder);

        if (key != stampHolder[0]) {
            firstRequestObserver.compareAndSet(onlyFirstRequest, new OnlyFirstRequest(), stampHolder[0], key);
        }

        onlyFirstRequest = firstRequestObserver.get(stampHolder);

        if (stampHolder[0] != key) {
            warpContext().pushException(new IllegalStateException("There should be only one concurrent Warp execution"));
        }

        return onlyFirstRequest;
    }
private OnlyFirstRequest retrieveFirstRequestObserver ( ) { int key = warpContext ( ) . hashCode ( ) ; int [ ] stampHolder = new int [ 1 ] ; OnlyFirstRequest onlyFirstRequest = firstRequestObserver . get ( stampHolder ) ; if ( key != stampHolder [ 0 ] ) { firstRequestObserver . compareAndSet ( onlyFirstRequest , new OnlyFirstRequest ( ) , stampHolder [ 0 ] , key ) ; } onlyFirstRequest = firstRequestObserver . get ( stampHolder ) ; if ( stampHolder [ 0 ] != key ) { warpContext ( ) . pushException ( new IllegalStateException ( "There should be only one concurrent Warp execution" ) ) ; } return onlyFirstRequest ; }
Obtains new firestRequestObserver for each new warpContext (invaliding previous one)