class SearchMessageSelector extends Object implements MessageSelector
Filters incoming DatabaseStoreMessage and DatabaseSearchReplyMessage to identify responses corresponding to ongoing search operations. Tracks match status, expiration times, and coordinates with SearchState to manage pending peer queries.
Provides unique identification for each selector instance and implements continuation logic based on search progress and timeout conditions. Ensures proper response correlation between sent queries and received replies.
| Constructor and Description |
|---|
SearchMessageSelector(RouterContext context,
RouterInfo peer,
long expiration,
SearchState state)SearchMessageSelector. |
| Modifier and Type | Method and Description |
|---|---|
boolean | continueMatching()Continue matching until the search expires or the value is found. |
long | getExpiration()Absolute time when this selector stops matching. |
boolean | isMatch(I2NPMessage message)Whether the message is a store for the searched key. |
String | toString()Debug description of this selector. |
public SearchMessageSelector(RouterContext context, RouterInfo peer, long expiration, SearchState state)
public boolean continueMatching()
continueMatching in interface MessageSelectorpublic long getExpiration()
getExpiration in interface MessageSelectorpublic boolean isMatch(I2NPMessage message)
isMatch in interface MessageSelector