reserve


Description:

public void* reserve (void* key)

Reserves key in this.

If key is already reserved in another thread, then wait until the reservation has been committed.

After reserving key, you either get a reference to the object corresponding to key (similar to @get) or you get null, signifying that you MUST call either add or abort.

Parameters:

this

a ObjectBag

key

the key to reserve

Returns:

the object for key, or null if key is not found