Attempts to find the UID matching a given name @param type The type of UID @param name The name to search for @throws IllegalArgumentException if the type is not valid @throws NoSuchUniqueName if the name was not found @since 2.0
(final UniqueIdType type, final String name)
| 673 | * @since 2.0 |
| 674 | */ |
| 675 | public byte[] getUID(final UniqueIdType type, final String name) { |
| 676 | try { |
| 677 | return getUIDAsync(type, name).join(); |
| 678 | } catch (NoSuchUniqueName e) { |
| 679 | throw e; |
| 680 | } catch (IllegalArgumentException e) { |
| 681 | throw e; |
| 682 | } catch (Exception e) { |
| 683 | LOG.error("Unexpected exception", e); |
| 684 | throw new RuntimeException(e); |
| 685 | } |
| 686 | } |
| 687 | |
| 688 | /** |
| 689 | * Attempts to find the UID matching a given name |