Package org.geotools.caching.spatialindex

Examples of org.geotools.caching.spatialindex.NodeIdentifier.writeUnLock()


    private void releaseLocks(){
      try {
        for (Iterator<NodeIdentifier> iterator = writelocks.iterator(); iterator.hasNext();) {
          NodeIdentifier type = (NodeIdentifier) iterator.next();
          try{
              type.writeUnLock();
          }catch (Exception ex){
          //    logger.log(Level.SEVERE, "Could not release write lock.", ex);
          }
        }
      } catch (Exception ex) {
View Full Code Here


            node.writeLock();
            try {
              tree.evict(node);
              queue.remove(node);
            } finally {
              node.writeUnLock();
            }
          } catch (Exception ex) {
            ex.printStackTrace();
            return false;
          }
View Full Code Here

    } catch (Exception ex) {
        logger.log(Level.SEVERE, "Failed to create feature collection iterator.", ex);
          if (missing != null){
              for( Iterator<NodeIdentifier> iterator = missing.iterator(); iterator.hasNext(); ) {
                  NodeIdentifier nodeid = (NodeIdentifier) iterator.next();
                  nodeid.writeUnLock();
              }
          }
          if (found != null){
              for( Iterator<NodeIdentifier> iterator = found.iterator(); iterator.hasNext(); ) {
                    NodeIdentifier nodeid = (NodeIdentifier) iterator.next();
View Full Code Here

            }
            if (nodeid.isValid()) {
                // might have been validated by previous thread; so lets make sure we have the correct queue
                nodeid.readLock();
                found.add(nodeid);
                nodeid.writeUnLock();
                iterator.remove();
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.