code: public boolean acquireLock (String name)
      {
          // check for the existence of the lock in the list and add it if it's not already there
          Object[] list = ListUtil.testAndAdd(_locks, name);
          if (list == null) {
              // a null list means the object was already in the list
              return false;
  
          } else {
              // a non-null list means the object was added
              _locks = list;
              return true;
          }
      }
docs: At times, an entity on the server may need to ensure that events it has queued up have made
  it through the event queue and are applied to their respective objects before a service may
  safely be undertaken again. To make this possible, it can acquire a lock on a distributed
  object, generate the events in question and then release the lock (via a call to
  <code>releaseLock</code>) which will queue up a final event, the processing of which will
  release the lock. Thus the lock will not be released until all of the previously generated
  events have been processed.  If the service is invoked again before that lock is released,
  the associated call to <code>acquireLock</code> will fail and the code can respond
  accordingly. An object may have any number of outstanding locks as long as they each have a
  unique name.
  
  @param name the name of the lock to acquire.
  
  @return true if the lock was acquired, false if the lock was not acquired because it has not
  yet been released from a previous acquisition.
  
  @see #releaseLock