public Set < String > getRegisteredAccountReservationKeysForCurrentThread ( ) { lock . lock ( ) ; try { Map < MailAccount , String > accountsForThread = transformValues ( filterValues ( usedAccounts , new CurrentThreadWrapperPredicate ( ) ) , new Function < ThreadReservationKeyWrapper , String > ( ) { @ Override public String apply ( final ThreadReservationKeyWrapper input ) { return input . accountReservationKey ; } } ) ; return ImmutableSet . copyOf ( accountsForThread . values ( ) ) ; } finally { lock . unlock ( ) ; } }
Gets the set of reservation key under which accounts are reserved for the current thread .