private void lockEvent ( EventId eventId ) { Lockable < V > eventWrapper = sharedBuffer . getEvent ( eventId ) ; checkState ( eventWrapper != null , "Referring to non existent event with id %s" , eventId ) ; eventWrapper . lock ( ) ; sharedBuffer . upsertEvent ( eventId , eventWrapper ) ; }
Increases the reference counter for the given event so that it is not accidentally removed .