Examples of lock()


Examples of org.eclipse.jgit.storage.file.PackLock.lock()

    if (lockMessage != null) {
      // If we have a reason to create a keep file for this pack, do
      // so, or fail fast and don't put the pack in place.
      //
      try {
        if (!keep.lock(lockMessage))
          throw new IOException(MessageFormat.format(JGitText.get().cannotLockPackIn, finalPack));
      } catch (IOException e) {
        cleanupTemporaryFiles();
        throw e;
      }
View Full Code Here

Examples of org.eclipse.orion.server.core.resources.FileLocker.lock()

        throw new RuntimeException("Meta File Error, parent is not a folder");
      }
      File newFile = retrieveMetaFile(parent, name);
      FileLocker locker = new FileLocker(newFile);
      try {
        locker.lock();
      } catch (IOException e) {
        Logger logger = LoggerFactory.getLogger("org.eclipse.orion.server.config"); //$NON-NLS-1$
        logger.error("Meta File Error, file IO error, could not lock the file", e); //$NON-NLS-1$
        throw new RuntimeException("Meta File Error, file IO error, could not lock the file", e);
      }
View Full Code Here

Examples of org.eclipse.osgi.service.datalocation.Location.lock()

      }

            // at this point its valid, so try to lock it and update the
            // metadata version information if successful
            try {
                if (instanceLoc.lock()) {
                    writeWorkspaceVersion();
                    return null;
                }
               
                // we failed to create the directory. 
View Full Code Here

Examples of org.exist.dom.DocumentSet.lock()

        // check if the loaded documents should remain locked
        NewArrayNodeSet result = new NewArrayNodeSet(2);
        try {
            // wait for pending updates
            if (!context.inProtectedMode())
                {ds.lock(context.getBroker(), false, true);}
          DocumentImpl doc;
          for (final Iterator<DocumentImpl> i = ds.getDocumentIterator(); i.hasNext();) {
              doc = i.next();
                if (context.inProtectedMode() && !context.getProtectedDocs().containsKey(doc.getDocId()))
                    {continue;}
View Full Code Here

Examples of org.exist.versioning.svn.WorkingCopy.lock()

        String lockComment = args[1].getStringValue();
      
        Resource wcDir = new Resource(uri);
       
        try {
      wc.lock(wcDir, false, lockComment);
    } catch (SVNException e) {
            throw new XPathException(this, e.getMessage(), e);
    }
       
        return Sequence.EMPTY_SEQUENCE;
View Full Code Here

Examples of org.exist.versioning.svn.internal.wc.admin.SVNAdminArea.lock()

        public SVNAdminArea getAdminArea() throws SVNException {
            String path = getPath();
            File file = new Resource(myAdminInfo.getAnchor().getRoot(), path);
            SVNAdminArea area = myAdminInfo.getWCAccess().retrieve(file);
            if (myIsLockOnDemand && area != null && !area.isLocked()) {
                area.lock(false);
                area = myAdminInfo.getWCAccess().upgrade(file);
            }
            return area;
        }
View Full Code Here

Examples of org.exoplatform.services.jcr.cluster.JCRWebdavConnection.lock()

     
      conn.addDir(nodeName);
      conn.addNode(nodeName + "/" + lockedNodeName, "".getBytes());
     
      // lock
      String lockToken =  conn.lock(nodeName + "/" + lockedNodeName);
     
      // check
      for (JCRWebdavConnection connection : getConnections())
      {
         HTTPResponse response = connection.removeNode(nodeName + "/" + lockedNodeName);
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.NodeImpl.lock()

      node1.addMixin(mixins[0]);
      node1.addMixin(mixins[1]);
      this.testNode.save();

      node1.lock(true, false);

      checkMixins(mixins, node1);
   }

   public void testFewMixinAddRemove() throws Exception
View Full Code Here

Examples of org.gatein.cdi.contexts.beanstore.BeanStore.lock()

            return beanInstance.getInstance();
        } else if (creationalContext != null) {
            LockedBean lock = null;
            try {
                if (multithreaded) {
                    lock = beanStore.lock(id);
                    beanInstance = beanStore.getBean(id);
                    if (beanInstance != null) {
                        return beanInstance.getInstance();
                    }
                }
View Full Code Here

Examples of org.geoserver.platform.resource.Resource.lock()

        ProxyConfig retval;
        Resource.Lock lock = null;
        try {
            GeoServerResourceLoader loader = GeoServerExtensions.bean(GeoServerResourceLoader.class);
            Resource configFile = loader.get( "proxy/proxy.xml" );
            lock = configFile.lock();
           
            InputStream proxyConfStream = configFile.in();
            XStream xs = new XStream();
            //Take the read lock, then read the file
            retval = (ProxyConfig) (xs.fromXML(proxyConfStream));
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.