Detect endpoint of request

Endpoint has three parameters: method, api_id and uri. For example: { "uri": "/stub-tyk-only/anything/{id}", "method": "POST", "api_id": "2" }. As an input to my method I get request object containing all these fields but with processed uri. For example: { "uri": "/stub-tyk-only/anything/123", "method": "POST", "api_id": "2", //other fields }. List of available endpoint is fixed. For given request object I need to find endpoint from the list with unprocessed uri. What is the best data structure to store list of endpoints? What is the fastest way to perform this task? Memory consumption does not matter. The main goal is high performance.

Everything should be implemented in Java.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum