Examples of writeUnlock()


Examples of org.apache.openjpa.datacache.QueryCache.writeUnlock()

    public void testWriteLock() throws Exception {
        final QueryCache qc = emf.getConfiguration().getDataCacheManagerInstance().getSystemQueryCache();
        Thread t2 = new Thread() {
            public void run() {
                qc.writeLock();
                qc.writeUnlock();
            }
        };
        t2.start();
        t2.join(5000);
       
View Full Code Here

Examples of org.apache.openjpa.datacache.QueryCache.writeUnlock()

    public void testWriteLock() throws Exception {
        final QueryCache qc = emf.getConfiguration().getDataCacheManagerInstance().getSystemQueryCache();
        Thread t2 = new Thread() {
            public void run() {
                qc.writeLock();
                qc.writeUnlock();
            }
        };
        t2.start();
        t2.join(5000);
       
View Full Code Here

Examples of org.apache.openjpa.datacache.QueryCache.writeUnlock()

    public void testWriteLock() throws Exception {
        final QueryCache qc = emf.getConfiguration().getDataCacheManagerInstance().getSystemQueryCache();
        Thread t2 = new Thread() {
            public void run() {
                qc.writeLock();
                qc.writeUnlock();
            }
        };
        t2.start();
        t2.join(5000);
       
View Full Code Here

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

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

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

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

    } 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

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

            }
            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

Examples of org.gephi.graph.api.Graph.writeUnlock()

                if(edge.isSelfLoop()) {
                    graph.removeEdge(edge);
                    removed++;
                }
            }
            graph.writeUnlock();
           
            //Notification message
            NotifyDescriptor d = new NotifyDescriptor.Message(removed + " self-loop have been removed", NotifyDescriptor.INFORMATION_MESSAGE);
            DialogDisplayer.getDefault().notify(d);
        } else {
View Full Code Here

Examples of org.impalaframework.module.spi.FrameworkLockHolder.writeUnlock()

           
            ImpalaServletUtils.publishWebApplicationContext(wac, this);
            return wac;
        }
        finally {
            frameworkLockHolder.writeUnlock();
        }
    }

    protected HttpServiceInvoker getInvoker(WebApplicationContext wac,
            HttpServlet delegateServlet,
View Full Code Here

Examples of org.impalaframework.module.spi.FrameworkLockHolder.writeUnlock()

       
        FrameworkLockHolder frameworkLockHolder = createMock(FrameworkLockHolder.class);
        operation.setFrameworkLockHolder(frameworkLockHolder);
       
        frameworkLockHolder.writeLock();
        frameworkLockHolder.writeUnlock();
       
        replay(frameworkLockHolder);
       
        ModuleStateHolder moduleStateHolder = createMock(ModuleStateHolder.class);
        Application application = TestApplicationManager.newApplicationManager(null, moduleStateHolder, null).getCurrentApplication();
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.