Examples of lock()


Examples of org.apache.hadoop.hive.ql.lockmgr.HiveLockManager.lock()

      new HiveLockObjectData(lockTbl.getQueryId(),
                             String.valueOf(System.currentTimeMillis()),
                             "EXPLICIT");

    if (partSpec == null) {
      HiveLock lck = lockMgr.lock(new HiveLockObject(tbl, lockData), mode, true, 0, 0);
      if (lck == null) {
        return 1;
      }
      return 0;
    }
View Full Code Here

Examples of org.apache.harmony.awt.nativebridge.Int16Pointer.lock()

            return hTheme;
        }

        private long open(String name) {
            Int16Pointer namePtr = bridge.createInt16Pointer(name, false);
            long hTheme = win32.OpenThemeData(javaWindow, namePtr.lock());
            namePtr.unlock();
            return hTheme;
        }

        public boolean isEnabled() {
View Full Code Here

Examples of org.apache.harmony.awt.nativebridge.Int32Pointer.lock()

        int pixelFormat = choosePixelFormatARB(hdc);

        Int32Pointer attribList = NativeBridge.getInstance().createInt32Pointer(1, true);
        attribList.set(0,0);
        long id = wgl.wglCreatePbufferARB(hdc, pixelFormat, w, h, attribList.lock());
        attribList.unlock();
        attribList.free();

        long buffHdc = wgl.wglGetPbufferDCARB(id);
View Full Code Here

Examples of org.apache.harmony.awt.nativebridge.Int8Pointer.lock()

    private MultiRectArea decodeComplexRgn(long hRgn, int dx, int dy) {
        int nBytes = win32.GetRegionData(hRgn, 0, 0);
        Int8Pointer rgnDataPtr = bridge.createInt8Pointer(nBytes, false);

        win32.GetRegionData(hRgn, nBytes, rgnDataPtr.lock());
        rgnDataPtr.unlock();
        Win32.RGNDATA rgnData = win32.createRGNDATA(rgnDataPtr);
        Win32.RGNDATAHEADER rdh = rgnData.get_rdh();
        Int8Pointer bufferPtr = rgnData.get_Buffer();
View Full Code Here

Examples of org.apache.hcatalog.hbase.snapshot.lock.WriteLock.lock()

    WriteLock wLock = new WriteLock(zkUtil.getSession(), lockPath,
      Ids.OPEN_ACL_UNSAFE);
    RMLockListener myLockListener = new RMLockListener();
    wLock.setLockListener(myLockListener);
    try {
      boolean lockGrabbed = wLock.lock();
      if (lockGrabbed == false) {
        //TO DO : Let this request queue up and try obtaining lock.
        throw new IOException(
          "Unable to obtain lock while beginning transaction. "
            + transaction.toString());
View Full Code Here

Examples of org.apache.helix.lock.HelixLock.lock()

  @Override
  public boolean createCluster(ClusterConfig cluster) {
    ClusterId clusterId = clusterId();
    HelixLock lock = _lockProvider.getLock(clusterId, Scope.cluster(clusterId));
    boolean locked = lock.lock();
    if (locked) {
      try {
        return _clusterAccessor.createCluster(cluster);
      } finally {
        lock.unlock();
View Full Code Here

Examples of org.apache.jackrabbit.api.jsr283.lock.LockManager.lock()

            AccessDeniedException, InvalidItemStateException,
            RepositoryException {
        // check state of this instance
        sanityCheck();
        LockManager lockMgr = ((WorkspaceImpl) session.getWorkspace()).getLockManager();
        return lockMgr.lock(getPath(), isDeep, isSessionScoped, Long.MAX_VALUE, null);
    }

    /**
     * {@inheritDoc}
     */
 
View Full Code Here

Examples of org.apache.jackrabbit.core.lock.LockManager.lock()

        checkLockable();

        LockManager lockMgr = session.getLockManager();
        synchronized (lockMgr) {
            Lock lock = lockMgr.lock(this, isDeep, isSessionScoped);

            boolean succeeded = false;

            try {
                // add properties to content
View Full Code Here

Examples of org.apache.jackrabbit.ocm.manager.ObjectContentManager.lock()

           
            // --------------------------------------------------------------------------------
            // Lock the object
            // --------------------------------------------------------------------------------          
           
            Lock lock = ocm.lock("/test", true, false);
            assertTrue("the Lock owner is not correct", lock.getLockOwner().equals("superuser"));
           
            // --------------------------------------------------------------------------------
            // Check if the object is locked
            // --------------------------------------------------------------------------------
View Full Code Here

Examples of org.apache.lenya.cms.repository.Node.lock()

                        + uuid + ":" + language + "] already exists!");
            }

            Document document = factory.get(pub, area, uuid, language);
            Node node = document.getRepositoryNode();
            node.lock();

            document.setResourceType(documentType);
            document.setSourceExtension(extension);
            document.setMimeType(mimeType);
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.