Examples of lock()


Examples of org.springframework.webflow.conversation.Conversation.lock()

    ExternalContextHolder.setExternalContext(new MockExternalContext());
    Conversation conversation = conversationManager.beginConversation(new ConversationParameters("test", "test",
        "test"));
    ConversationId conversationId = conversation.getId();
    assertNotNull(conversationManager.getConversation(conversationId));
    conversation.lock();
    conversation.end();
    conversation.unlock();
    try {
      conversationManager.getConversation(conversationId);
      fail("Conversation should have ben removed");
View Full Code Here

Examples of org.springframework.webflow.execution.repository.FlowExecutionLock.lock()

        logger.debug("Resuming flow execution with key '" + flowExecutionKey);
      }
      ExternalContextHolder.setExternalContext(context);
      FlowExecutionKey key = executionRepository.parseFlowExecutionKey(flowExecutionKey);
      FlowExecutionLock lock = executionRepository.getLock(key);
      lock.lock();
      try {
        FlowExecution flowExecution = executionRepository.getFlowExecution(key);
        flowExecution.resume(context);
        if (!flowExecution.hasEnded()) {
          executionRepository.putFlowExecution(flowExecution);
View Full Code Here

Examples of org.terasology.world.chunks.Chunk.lock()

    @Override
    public void completeUpdate() {
        ReadyChunkInfo readyChunkInfo = lightMerger.completeMerge();
        if (readyChunkInfo != null) {
            Chunk chunk = readyChunkInfo.getChunk();
            chunk.lock();
            try {
                chunk.markReady();
                if (!readyChunkInfo.isNewChunk()) {
                    PerformanceMonitor.startActivity("Generating Block Entities");
                    generateBlockEntities(chunk);
View Full Code Here

Examples of org.terasology.world.chunks.CoreChunk.lock()

    public Block setBlock(Vector3i worldPos, Block type) {
        Vector3i chunkPos = TeraMath.calcChunkPos(worldPos);
        CoreChunk chunk = chunkProvider.getChunk(chunkPos);
        if (chunk != null) {
            Vector3i blockPos = TeraMath.calcBlockPos(worldPos);
            chunk.lock();
            Block oldBlockType = chunk.setBlock(blockPos, type);
            chunk.unlock();
            if (oldBlockType != type) {
                BlockChange oldChange = blockChanges.get(worldPos);
                if (oldChange == null) {
View Full Code Here

Examples of org.tmatesoft.sqljet.core.internal.table.ISqlJetBtreeSchemaTable.lock()

        final SqlJetViewDef viewDef = (SqlJetViewDef) viewDefs.get(viewName);
        final ISqlJetBtreeSchemaTable schemaTable = openSchemaTable(true);

        try {

            schemaTable.lock();

            try {

                db.getOptions().changeSchemaVersion();
View Full Code Here

Examples of org.tmatesoft.svn.core.internal.wc.admin.SVNAdminArea.lock()

        public SVNAdminArea getAdminArea() throws SVNException {
            String path = getPath();
            File file = new File(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.tmatesoft.svn.core.io.SVNRepository.lock()

        try {
            final SVNURL topURL = collectLockInfo(wcAccess, paths, entriesMap, pathsRevisionsMap, true, stealLock);
            SVNRepository repository = createRepository(topURL, paths[0], wcAccess, true);
            final SVNURL rootURL = repository.getRepositoryRoot(true);

            repository.lock(pathsRevisionsMap, lockMessage, stealLock, new ISVNLockHandler() {
                public void handleLock(String path, SVNLock lock, SVNErrorMessage error) throws SVNException {
                    SVNURL fullURL = rootURL.appendPath(path, false);
                    LockInfo lockInfo = (LockInfo) entriesMap.get(fullURL);
                    SVNAdminArea dir = wcAccess.probeRetrieve(lockInfo.myFile);
                    if (error == null) {
View Full Code Here

Examples of org.uberfire.commons.cluster.ClusterService.lock()

                    setPreReceiveHook( new PreReceiveHook() {
                        @Override
                        public void onPreReceive( final ReceivePack rp,
                                                  final Collection<ReceiveCommand> commands ) {
                            if ( clusterService != null ) {
                                clusterService.lock();
                            }

                            for ( final ReceiveCommand command : commands ) {
                                final RevCommit lastCommit = JGitUtil.getLastCommit( fs.gitRepo(), command.getRefName() );
                                oldTreeRefs.put( command.getRefName(), lastCommit );
View Full Code Here

Examples of org.uberfire.commons.lock.impl.ThreadLockServiceImpl.lock()

public class ThreadLockServiceTest {

    @Test
    public void testLock() {
        final ThreadLockServiceImpl lockService = new ThreadLockServiceImpl();
        lockService.lock();
        lockService.unlock();
    }

    @Test
    public void testDoubleLock() {
View Full Code Here

Examples of org.unidal.webres.resource.spi.IResourceRegistry.lock()

        new ResourceConfigurator().configure(registry);
        new ResourceTagConfigurator().configure(registry);
        new ResourceTagLibConfigurator().configure(registry);

        registry.lock();
      }

      ResourceRuntimeContext.setup(contextPath);
    }
  }
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.