Package org.lilyproject.repository.api

Examples of org.lilyproject.repository.api.ConcurrentUpdateTypeException


        }
        // Check if the timestamp is older than the concurrent timeout
        // The concurrent timeout should be large enough to allow fieldType caches to be refreshed
        if (originalTimestamp != null) {
            if ((originalTimestamp + CONCURRENT_TIMEOUT) >= now) {
                throw new ConcurrentUpdateTypeException(name.toString());
            }

        }
        // Try to put our own timestamp with a check and put to make sure we're the only one doing this
        Put put = new Put(nameBytes);
        put.add(TypeCf.DATA.bytes, TypeColumn.CONCURRENT_TIMESTAMP.bytes, Bytes.toBytes(now));
        if (!getTypeTable()
                .checkAndPut(nameBytes, TypeCf.DATA.bytes, TypeColumn.CONCURRENT_TIMESTAMP.bytes, originalTimestampBytes, put)) {
            throw new ConcurrentUpdateTypeException(name.toString());
        }
    }
View Full Code Here

TOP

Related Classes of org.lilyproject.repository.api.ConcurrentUpdateTypeException

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.