Examples of lock()


Examples of nexj.core.rpc.file.ra.LockableFile.lock()

      }

      LockableFile directFile = new LockableFile(dataFile);

      //BLOCKING
      directFile.lock(true);
     
      try
      {
         Instance instance = m_context.findInstance(query.getMetaclass(), oid);
View Full Code Here

Examples of nexj.core.util.lock.Lock.lock()

    */
   public Lock getSessionLock() throws TimeoutException
   {
      Lock lock = s_lockMap.get(m_request.getSession(), m_lLockTimeout);

      lock.lock();

      return lock;
   }

   /**
 
View Full Code Here

Examples of org.apache.blur.zookeeper.ZooKeeperLockManager.lock()

  @Test
  public void testSafeModeNoCache() throws KeeperException, InterruptedException {
    String safemodePath = ZookeeperPathConstants.getSafemodePath(DEFAULT);
    ZooKeeperLockManager zooKeeperLockManager = new ZooKeeperLockManager(zooKeeper1, safemodePath);
    zooKeeperLockManager.lock(DEFAULT);
    assertTrue(clusterStatus2.isInSafeMode(false, DEFAULT));
    zooKeeperLockManager.unlock(DEFAULT);
    assertFalse(clusterStatus2.isInSafeMode(false, DEFAULT));
  }
View Full Code Here

Examples of org.apache.catalina.tribes.tipis.ReplicatedMapEntry.lock()

            boolean diff = ((value instanceof ReplicatedMapEntry) && ((ReplicatedMapEntry)value).isDiffable());
            MapMessage msg = null;
            if (diff) {
                ReplicatedMapEntry rentry = (ReplicatedMapEntry)entry.getValue();
                try {
                    rentry.lock();
                    //construct a diff message
                    msg =
                        new MapMessage(mapContextName, MapMessage.MSG_BACKUP, true, (Serializable)entry.getKey(), null,
                                       rentry.getDiff(), entry.getPrimary(), entry.getBackupNodes());
                } catch (IOException x) {
View Full Code Here

Examples of org.apache.cocoon.components.pipeline.impl.PipelineComponentInfo.lock()

        prepareSelector(info, configInfo, ProcessingPipeline.ROLE);
        prepareSelector(info, configInfo, Action.ROLE);
        prepareSelector(info, configInfo, Selector.ROLE);
        prepareSelector(info, configInfo, Matcher.ROLE);
        prepareSelector(info, configInfo, Reader.ROLE);
        info.lock();
        if (!registry.containsBeanDefinition(PipelineComponentInfo.ROLE)) {
            final RootBeanDefinition beanDef = new RootBeanDefinition();
            beanDef.setBeanClass(PipelineComponentInfoFactoryBean.class);
            beanDef.setSingleton(true);
            beanDef.setLazyInit(false);
View Full Code Here

Examples of org.apache.commons.configuration.sync.SynchronizerSupport.lock()

    private void loadFromStream(InputStream in, String encoding, URL url)
            throws ConfigurationException
    {
        checkContent();
        SynchronizerSupport syncSupport = fetchSynchronizerSupport();
        syncSupport.lock(LockMode.WRITE);
        try
        {
            injectFileLocator(url);

            if (getContent() instanceof InputStreamSupport)
View Full Code Here

Examples of org.apache.commons.configuration2.sync.SynchronizerSupport.lock()

    private void loadFromStream(InputStream in, String encoding, URL url)
            throws ConfigurationException
    {
        checkContent();
        SynchronizerSupport syncSupport = fetchSynchronizerSupport();
        syncSupport.lock(LockMode.WRITE);
        try
        {
            injectFileLocator(url);

            if (getContent() instanceof InputStreamSupport)
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.Type.lock()

  public void getField_locked() throws Exception
  {
    Type type = new Type( "blah" );
    assertNotNull( type.getField( "a" ) );
    assertNotNull( type.getField( "b" ) );
    type.lock();
    assertNotNull( type.getField( "a" ) );
    assertNotNull( type.getField( "b" ) );
    assertNull( type.getField( "x" ) );
    assertNull( type.getField( "y" ) );
  }
View Full Code Here

Examples of org.apache.geronimo.management.geronimo.CertificationAuthority.lock()

            CertificationAuthority ca = getCertificationAuthority(request);
            if(ca == null) {
                log.warn("CA is not running or CA may not have been initialized.  Unable to lock CA.");
                response.setRenderParameter(ERROR_MSG, "CA is not running or CA may not have been initialized.  Unable to lock CA.");
            } else {
                ca.lock();
                log.info("CA is now locked.");
                response.setRenderParameter(INFO_MSG, "CA has been locked!");
            }
        } else if(request.getParameter("publish") != null) {
            CertificationAuthority ca = getCertificationAuthority(request);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.common.Storage.StorageDirectory.lock()

      secondary = null;

      LOG.info("===> Locking a dir, starting second 2NN");
      // Lock one of its dirs, make sure it fails to start
      LOG.info("Trying to lock" + savedSd);
      savedSd.lock();
      try {
        secondary = startSecondaryNameNode(conf);
        assertFalse("Should fail to start 2NN when " + savedSd + " is locked",
            savedSd.isLockSupported());
      } catch (IOException ioe) {
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.