Package org.geoserver.GeoServerConfigurationLock

Examples of org.geoserver.GeoServerConfigurationLock.LockType


        // who cares?
    }

    @Override
    public void onEndRequest() {
        LockType type = THREAD_LOCK.get();
        if (type != null) {
            THREAD_LOCK.remove();
            locker.unlock(type);
        }
    }
View Full Code Here


    @Override
    public void onRequestTargetSet(IRequestTarget target) {
        // we can have many of these calls per http call, avoid locking multiple times,
        // onEndRequest will be called just once
        LockType type = THREAD_LOCK.get();
        if (type != null) {
            return;
        }

        // setup a write lock for secured pages, a read one for the others
View Full Code Here

        this.locker = locker;
    }

    @Override
    public void init(Request request, Response response) {
        LockType type = THREAD_LOCK.get();
        if (type != null) {
            throw new RuntimeException("The previous lock was not released: " + type);
        }
    }
View Full Code Here

        if (restlet != null) {
            // these are the restlets we have to lock
            if (restlet.getClass().getPackage().getName().startsWith("org.geoserver.catalog.rest")) {
                // choose a lok type based on the method
                LockType type;
                if ((m == Method.DELETE || m == Method.COPY || m == Method.MKCOL
                        || m == Method.MOVE || m == Method.PROPPATCH || m == Method.POST || m == Method.PUT)) {
                    type = LockType.WRITE;
                } else {
                    type = LockType.READ;
View Full Code Here

        // nothing to see here, move on
    }

    @Override
    public void finished(Request request, Response response) {
        LockType type = THREAD_LOCK.get();
        if (type != null) {
            THREAD_LOCK.remove();
            locker.unlock(type);
        }
View Full Code Here

TOP

Related Classes of org.geoserver.GeoServerConfigurationLock.LockType

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.