Examples of lock()


Examples of org.modeshape.jcr.cache.MutableCachedNode.lock()

            MutableCachedNode lockedNode = lockingSession.mutable(nodeKey);

            PropertyFactory propertyFactory = session.propertyFactory();
            lockedNode.setProperty(lockingSession, propertyFactory.create(JcrLexicon.LOCK_OWNER, owner));
            lockedNode.setProperty(lockingSession, propertyFactory.create(JcrLexicon.LOCK_IS_DEEP, isDeep));
            lockedNode.lock(isSessionScoped);

            // Now save both sessions. This will fail with a LockFailureException if the locking failed ...
            lockingSession.save(systemSession, null);
        } catch (LockFailureException e) {
            // Someone must have snuck in and locked the node, and we just didn't receive notification of it yet ...
View Full Code Here

Examples of org.netbeans.modules.editor.indent.api.Reformat.lock()

            return;
        }

        BaseDocument doc = (BaseDocument) _doc;
        final Reformat reformatter = Reformat.get(doc);
        reformatter.lock();
        try {
            doc.runAtomic(new Runnable() {

                public void run() {
                    try {
View Full Code Here

Examples of org.odmg.Transaction.lock()

        Transaction tx = odmg.newTransaction();
        tx.begin();
        // add objects to list
        for (int i = 0; i < 5; i++)
        {
            tx.lock(createObject(name), Transaction.WRITE);
        }
        tx.commit();

        tx.begin();
        // query test objects
View Full Code Here

Examples of org.openide.filesystems.FileObject.lock()

                //Delete original file
                fileObject.delete();

                //Rename temp file
                FileObject tempFileObject = FileUtil.toFileObject(writeFile);
                FileLock lock = tempFileObject.lock();
                tempFileObject.rename(lock, name, ext);
                lock.releaseLock();
            } else if (cancel) {
                //Delete temp file
                FileObject tempFileObject = FileUtil.toFileObject(writeFile);
View Full Code Here

Examples of org.openstreetmap.osmosis.core.util.FileBasedLock.lock()

    FileBasedLock fileLock;
   
    fileLock = new FileBasedLock(new File(workingDirectory, LOCK_FILE_NAME));
   
    try {
      fileLock.lock();
     
      initializeDirectory();
     
      fileLock.unlock();
     
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.layout.model.context.BoxDefinition.lock()

  protected AbstractRenderer(final OutputProcessor outputProcessor)
  {
    final BoxDefinition boxDefinition = new BoxDefinition();
    boxDefinition.setPreferredHeight(new RenderLength(100000, true));
    this.watermarkBoxDefinition = boxDefinition.lock();

    this.outputProcessor = outputProcessor;
    this.metaData = outputProcessor.getMetaData();
    this.normalFlowLayoutBuilder = createNormalFlowLayoutBuilder(metaData);
    this.headerLayoutBuilder = new SlottedLayoutBuilder(metaData, false);
View Full Code Here

Examples of org.photovault.dbhelper.ODMGXAWrapper.lock()

         */
        public ColorProfileDesc execute() {
            log.debug( "CreateProfile#execute: " + name );
            ODMGXAWrapper txw = new ODMGXAWrapper();
            ColorProfileDesc p = new ColorProfileDesc();
            txw.lock( p, Transaction.WRITE );
            p.setName( name );
            p.setDescription( description );
           
            // Copy the file to the default volume
            VolumeBase defvol = VolumeBase.getDefaultVolume();
View Full Code Here

Examples of org.redisson.core.RLock.lock()

    }

    @Test
    public void testExpire() throws InterruptedException {
        RLock lock = redisson.getLock("lock");
        lock.lock(2, TimeUnit.SECONDS);
       
        final long startTime = System.currentTimeMillis();
        final CountDownLatch latch = new CountDownLatch(1);
        new Thread() {
            public void run() {
View Full Code Here

Examples of org.sonatype.nexus.proxy.item.RepositoryItemUidLock.lock()

  public boolean deleteAttributes(final RepositoryItemUid uid)
      throws IOException
  {
    final RepositoryItemUidLock uidLock = uid.getLock();

    uidLock.lock(Action.delete);

    try {
      if (log.isDebugEnabled()) {
        log.debug("Deleting attributes on UID=" + uid.toString());
      }
View Full Code Here

Examples of org.springframework.aop.framework.Lockable.lock()

    // Invoke a non-advised method
    testBeanProxy.getAge();

    testBeanProxy.setName("");
    lockable.lock();
    try {
      testBeanProxy.setName(" ");
      fail("Should be locked");
    }
    catch (IllegalStateException ex) {
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.