Examples of acquireReadLock()


Examples of org.apache.jackrabbit.core.state.DefaultISMLocking.acquireReadLock()

                }
            }
        };
        thread.start();
        Thread.sleep(100);
        lock.acquireReadLock(null).release();
        r1.release();
        thread.join();
        if (ex[0] != null) {
            throw ex[0];
        }
View Full Code Here

Examples of org.apache.jackrabbit.core.state.ISMLocking.acquireReadLock()

                }
            }
        };
        thread.start();
        Thread.sleep(100);
        lock.acquireReadLock(null).release();
        r1.release();
        thread.join();
        if (ex[0] != null) {
            throw ex[0];
        }
View Full Code Here

Examples of org.eclipse.cdt.core.index.IIndex.acquireReadLock()

        scope = cprojects.toArray(new ICProject[cprojects.size()]);
      }

      IIndex index = CCorePlugin.getIndexManager().getIndex(
          scope, IIndexManager.ADD_DEPENDENCIES | IIndexManager.ADD_DEPENDENT);
      index.acquireReadLock();
      try{
        int offset = getOffset(commandLine);
        int length = commandLine.getIntValue(Options.LENGTH_OPTION);
        IName[] names = findElement(src, scope, context, offset, length);
        for (IName iname : names){
View Full Code Here

Examples of org.eclipse.cdt.core.index.IIndex.acquireReadLock()

    IIndex index = CCorePlugin.getIndexManager().getIndex(
        scope,
        IIndexManager.ADD_DEPENDENCIES |
        IIndexManager.ADD_DEPENDENT |
        IIndexManager.ADD_EXTENSION_FRAGMENTS_NAVIGATION);
    index.acquireReadLock();
    try{
      IASTTranslationUnit ast = src.getAST(index,
          ITranslationUnit.AST_CONFIGURE_USING_SOURCE_CONTEXT |
          ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
      IASTNodeSelector selector = ast.getNodeSelector(null);
View Full Code Here

Examples of org.eclipse.cdt.core.index.IIndex.acquireReadLock()

  {
    IIndex index = null;
    try {
      ICProject[] projects = CoreModel.getDefault().getCModel().getCProjects();
      index = CCorePlugin.getIndexManager().getIndex(projects);
      index.acquireReadLock();

      IASTTranslationUnit ast = src.getAST(index, AST_STYLE);
      ArrayList<IProblem> problems = new ArrayList<IProblem>();
      CollectionUtils.addAll(problems, ast.getPreprocessorProblems());
      CollectionUtils.addAll(problems, CPPVisitor.getProblems(ast));
View Full Code Here

Examples of org.eclipse.cdt.core.index.IIndex.acquireReadLock()

        Set<ICElement> seen = new HashSet<ICElement>();
        ICProject project = element.getCProject();
        ICProject[] scope = getScope(SCOPE_PROJECT, project);
        IIndex index = CCorePlugin.getIndexManager().getIndex(
            scope, IIndexManager.ADD_DEPENDENCIES | IIndexManager.ADD_DEPENDENT);
        index.acquireReadLock();
        try{
          IIndexName name = IndexUI.elementToName(index, element);
          result = formatElement(index, new Call(name, element), seen, callees);
        }finally{
          index.releaseReadLock();
View Full Code Here

Examples of org.neo4j.kernel.impl.core.TransactionState.acquireReadLock()

        TransactionImpl tx = getCurrentTransaction();
        if (tx==null) return; // no lock taken without external tx
        TransactionState state = tx.getState();
        switch (lockType) {
            case READ:
                state.acquireReadLock(element);
                break;
            case WRITE:
                state.acquireWriteLock(element);
                break;
            default: throw new IllegalStateException("Unknown lock type "+lockType);
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.