public synchronized int assignNewLocalId(){
  localId=localEventId.incrementAndGet();
  return localId;
}

public synchronized int assignNewLocalId ( ) { localId = localEventId . incrementAndGet ( ) ; return localId ; }
generates a new local id for this event .
