Package java.util.concurrent.locks

Examples of java.util.concurrent.locks.Lock.unlock()


          blockOffset += 2;
        }

        return length;
      } finally {
        lock.unlock();
      }
    } catch (InterruptedException e) {
      throw new IllegalStateException(e);
    } finally {
      block.free();
View Full Code Here


          return removeWrite(childBlock, keyBuffer, keyOffset, keyLength);
      } finally {
        childBlock.free();
      }
    } finally {
      blockLock.unlock();
    }
  }

  /**
   * Recursively remove a key from the index.
View Full Code Here

      try {
        byte []blockBuffer = block.getBuffer();

        return readLong(blockBuffer, offset);
      } finally {
        lock.unlock();
      }
    } catch (InterruptedException e) {
      throw new IllegalStateException(e);
    } finally {
      block.free();
View Full Code Here

        }
      }
     
      return _minN <= getLength(buffer);
    } finally {
      blockLock.unlock();
    }
  }

  /**
   * Balances the block size so it's always 1/2 full.  joinBlocks is called
View Full Code Here

        block.setDirty(blockOffset, blockOffset + length);
       
        return block;
      } finally {
        lock.unlock();
      }
    } catch (InterruptedException e) {
      throw new IllegalStateException(e);
    } finally {
      block.free();
View Full Code Here

              leftBlock.setDirty(0, BlockStore.BLOCK_SIZE);

              return false;
            }
          } finally {
            blockLock.unlock();
          }
        } finally {
          leftLock.unlock();
        }
      } finally {
View Full Code Here

        block.setDirty(blockOffset, blockTail);
       
        return block;
      } finally {
        lock.unlock();
      }
    } catch (InterruptedException e) {
      throw new IllegalStateException(e);
    } finally {
      block.free();
View Full Code Here

              rightBlock.setDirty(0, BlockStore.BLOCK_SIZE);

              return false;
            }
          } finally {
            rightLock.unlock();
          }
        } finally {
          blockLock.unlock();
        }
      } finally {
View Full Code Here

        block.setDirty(offset, offset + 8);
       
        return block;
      } finally {
        lock.unlock();
      }
    } catch (InterruptedException e) {
      throw new IllegalStateException(e);
    } finally {
      block.free();
View Full Code Here

              // System.out.println("FREE-ML: " + block);

              return true;
            }
          } finally {
            blockLock.unlock();
          }
        } finally {
          leftLock.unlock();
        }
      } finally {
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.