docs: private boolean aquireFileLock() {
  
          // PRE:
          //
          // raf is never null and is never closed upon entry.
          //
          // Rhetorical question to self: How does one tell if a RandomAccessFile
          // is closed, short of invoking an operation and getting an IOException
          // the says its closed (assuming you can control the Locale of the error
          // message)?
          //
          final RandomAccessFile lraf = super.raf;
  
          // In an ideal world, we would use a lock region back off approach,
          // starting with region MAX_LOCK_REGION, then MAX_NFS_LOCK_REGION,
          // then MIN_LOCK_REGION.
          //
          // In practice, however, it is just generally unwise to mount network
          // file system database instances.  Be warned.
          //
          // In general, it is probably also unwise to mount removable media
          // database instances that are not read-only.
          boolean success = false;
  
          try {
              if (this.fileLock != null) {
  
                  // API says never throws exception, but I suspect
                  // it's quite possible some research / FOSS JVMs might
                  // still throw unsupported operation exceptions on certain
                  // NIO classes...better to be safe than sorry.
                  if (this.fileLock.isValid()) {
                      return true;
                  } else {
  
                      // It's not valid, so releasing it is a no-op.
                      //
                      // However, we should still clean up the referenceand hope
                      // no previous complications exist (a hung FileLock in a
                      // flaky JVM) or that gc kicks in and saves the day...
                      // (unlikely, though).
                      this.releaseFileLock();
                  }
              }
  
              if (isPosixManditoryFileLock()) {
                  try {
                      Runtime.getRuntime().exec(new String[] {
                          "chmod", "g+s,g-x", file.getPath()
                      });
                  } catch (Exception ex) {
  
                      //ex.printStackTrace();
                  }
              }
  
              // Note: from FileChannel.tryLock(...) JavaDoc:
              //
              // @return  A lock object representing the newly-acquired lock,
              //          or <tt>null</tt> if the lock could not be acquired
              //          because another program holds an overlapping lock
              this.fileLock = lraf.getChannel().tryLock(0, MIN_LOCK_REGION,
                      false);
  
              // According to the API, if it's non-null, it must be valid.
              // This may not actually yet be the full truth of the matter under
              // all commonly available JVM implementations.
              // fileLock.isValid() API says it never throws, though, so
              // with fingers crossed...
              success = (this.fileLock != null && this.fileLock.isValid());
          } catch (Exception e) {}
  
          if (!success) {
              this.releaseFileLock();
          }
  
          return success;
      }