public void addLease(final Lease lease) throws LeaseStillHeldException {
    if (this.stopRequested) {
      return;
    }
    if (leases.containsKey(lease.getLeaseName())) {
      throw new LeaseStillHeldException(lease.getLeaseName());
    }
    lease.resetExpirationTime();
    leases.put(lease.getLeaseName(), lease);
  }
Inserts lease. Resets expiration before insertion.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LeaseManager.java