void lock ( String serverId ) { Assert . notNull ( serverId ) ; if ( this . locked ) { throw new IllegalStateException ( "Cannot lock already locked mutex: " + this ) ; } this . locked = true ; this . lockStart = new Date ( ) ; this . lastUpdate = this . lockStart ; this . serverId = serverId ; }
Mark the mutex as locked by the specific server