Examples of lock()


Examples of org.datanucleus.store.connection.ManagedConnection.lock()

            cf = connectionMgr.lookupConnectionFactory(nontxConnectionFactoryName);
        }
        mc = cf.getConnection(enlisted ? ec : null, ec.getTransaction(), null); // Will throw exception if already locked

        // Lock the connection now that it is in use by the user
        mc.lock();

        Runnable closeRunnable = new Runnable()
        {
            public void run()
            {
View Full Code Here

Examples of org.drools.common.InternalRuleBase.lock()

    }

    public static ObjectTypeNode attachObjectTypeNode(BuildContext context,
                                                      ObjectType objectType) {
        final InternalRuleBase ruleBase = context.getRuleBase();
        ruleBase.lock();
        try {
            InternalWorkingMemory[] wms = context.getWorkingMemories();

            EntryPointNode epn = ruleBase.getRete().getEntryPointNode( context.getCurrentEntryPoint() );
            if ( epn == null ) {
View Full Code Here

Examples of org.drools.core.common.InternalRuleBase.lock()

    }

    public static ObjectTypeNode attachObjectTypeNode(BuildContext context,
                                                      ObjectType objectType) {
        final InternalRuleBase ruleBase = context.getRuleBase();
        ruleBase.lock();
        try {
            InternalWorkingMemory[] wms = context.getWorkingMemories();
            NodeFactory nfactory = context.getComponentFactory().getNodeFactoryService();

            EntryPointNode epn = ruleBase.getRete().getEntryPointNode( context.getCurrentEntryPoint() );
View Full Code Here

Examples of org.drools.core.impl.InternalKnowledgeBase.lock()

    }

    public static ObjectTypeNode attachObjectTypeNode(BuildContext context,
                                                      ObjectType objectType) {
        final InternalKnowledgeBase ruleBase = context.getKnowledgeBase();
        ruleBase.lock();
        try {
            InternalWorkingMemory[] wms = context.getWorkingMemories();
            NodeFactory nfactory = context.getComponentFactory().getNodeFactoryService();

            EntryPointNode epn = ruleBase.getRete().getEntryPointNode( context.getCurrentEntryPoint() );
View Full Code Here

Examples of org.drools.persistence.PersistenceContext.lock()

        if (this.workItems != null) {
            workItemInfo = this.workItems.get(id);
        }
       
        if( this.pessimisticLocking && workItemInfo != null ) {
           context.lock(workItemInfo);
        }
       
        if (workItemInfo == null && context != null) {
            workItemInfo = context.findWorkItemInfo( id );
        }
View Full Code Here

Examples of org.dyno.visual.swing.designer.VisualDesigner.lock()

  }

  public void lockDesigner() {
    VisualDesigner designer = getDesigner();
    if (designer != null)
      designer.lock();
  }

  public void unlockDesigner() {
    VisualDesigner designer = getDesigner();
    if (designer != null)
View Full Code Here

Examples of org.eclipse.ecf.docshare2.DocShare.lock()

        if (remoteChanges[i] instanceof FileChangeMessage) {
          String path = ((FileChangeMessage) remoteChanges[i]).getPath();
          paths.add(path);
        }
      }
      docShare.lock((String[]) paths.toArray(new String[paths.size()]));
    }
    super.lock(remoteChanges);
  }

  protected void unlock(IModelChange[] remoteChanges) {
View Full Code Here

Examples of org.eclipse.jgit.dircache.DirCache.lock()

class WriteDirCache extends TextBuiltin {
  @Override
  protected void run() throws Exception {
    final DirCache cache = db.readDirCache();
    if (!cache.lock())
      throw die(CLIText.get().failedToLockIndex);
    cache.read();
    cache.write();
    if (!cache.commit())
      throw die(CLIText.get().failedToCommitIndex);
View Full Code Here

Examples of org.eclipse.jgit.internal.storage.file.LockFile.lock()

    final String head = db.getFullBranch();
    final ObjectId id = db.resolve(Constants.HEAD);
    if (!ObjectId.isId(head) && id != null) {
      final LockFile lf;
      lf = new LockFile(new File(db.getDirectory(), Constants.HEAD), db.getFS());
      if (!lf.lock())
        throw new IOException(MessageFormat.format(CLIText.get().cannotLock, Constants.HEAD));
      lf.write(id);
      if (!lf.commit())
        throw new IOException(CLIText.get().cannotDeatchHEAD);
    }
View Full Code Here

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

    if (meta == null)
      return;
    final LockFile lock = new LockFile(new File(meta, "FETCH_HEAD"),
        transport.local.getFS());
    try {
      if (lock.lock()) {
        final Writer w = new OutputStreamWriter(lock.getOutputStream());
        try {
          for (final FetchHeadRecord h : fetchHeadUpdates) {
            h.write(w);
            result.add(h);
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.