@Component public class ReservedNameListImpl extends java.lang.Object implements ReservedNameList
RESERVE_SECONDS_DEFAULT| Constructor and Description |
|---|
ReservedNameListImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearReservation(java.util.UUID reservation)
Releases a reservation for a name.
|
java.lang.String |
getName(java.util.UUID reservation)
Returns a reserved name.
|
java.util.UUID |
reserve(java.lang.String name)
Attempts to reserve the provided name.
|
public java.util.UUID reserve(java.lang.String name)
throws AlreadyExistsException
ReservedNameListIf the name is available, returns a token representing your reservation for the name. If you obtain a reservation for a name, you must present the reservation when creating an account; otherwise account creation fails since there is a reservation for that name.
reserve in interface ReservedNameListname - Name to reserveReservedNameList.RESERVE_SECONDS_DEFAULT seconds.AlreadyExistsException - If name has an active reservation.public void clearReservation(java.util.UUID reservation)
ReservedNameListclearReservation in interface ReservedNameListreservation - The reservation to release.public java.lang.String getName(java.util.UUID reservation)
ReservedNameListgetName in interface ReservedNameListreservation - The reservation for a name