Package org.apache.kafka.clients.admin
Class ListTransactionsOptions
java.lang.Object
org.apache.kafka.clients.admin.AbstractOptions<ListTransactionsOptions>
org.apache.kafka.clients.admin.ListTransactionsOptions
Options for
Admin.listTransactions()
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
Returns the duration ms value being filtered.Returns the set of producerIds that are being filtered or empty if none have been specified.Returns the set of states to be filtered or empty if no states have been specified.Returns transactional ID being filtered.filterOnDuration
(long durationMs) Filter only the transactions that are running longer than the specified duration.filterOnTransactionalIdPattern
(String pattern) Filter only the transactions that match with the given transactional ID pattern.filterProducerIds
(Collection<Long> producerIdFilters) Filter only the transactions from producers in a specific set of producerIds.filterStates
(Collection<TransactionState> states) Filter only the transactions that are in a specific set of states.int
hashCode()
toString()
Methods inherited from class org.apache.kafka.clients.admin.AbstractOptions
timeoutMs, timeoutMs
-
Constructor Details
-
ListTransactionsOptions
public ListTransactionsOptions()
-
-
Method Details
-
filterStates
Filter only the transactions that are in a specific set of states. If no filter is specified or if the passed set of states is empty, then transactions in all states will be returned.- Parameters:
states
- the set of states to filter by- Returns:
- this object
-
filterProducerIds
Filter only the transactions from producers in a specific set of producerIds. If no filter is specified or if the passed collection of producerIds is empty, then the transactions of all producerIds will be returned.- Parameters:
producerIdFilters
- the set of producerIds to filter by- Returns:
- this object
-
filterOnDuration
Filter only the transactions that are running longer than the specified duration. If no filter is specified or if the passed duration ms is less than 0, then the all transactions will be returned.- Parameters:
durationMs
- the duration in milliseconds to filter by- Returns:
- this object
-
filterOnTransactionalIdPattern
Filter only the transactions that match with the given transactional ID pattern. If the filter is null or if the passed string is empty, then all the transactions will be returned.- Parameters:
pattern
- the transactional ID regular expression pattern to filter by- Returns:
- this object
-
filteredStates
Returns the set of states to be filtered or empty if no states have been specified.- Returns:
- the current set of filtered states (empty means that no states are filtered and all transactions will be returned)
-
filteredProducerIds
Returns the set of producerIds that are being filtered or empty if none have been specified.- Returns:
- the current set of filtered states (empty means that no producerIds are filtered and all transactions will be returned)
-
filteredDuration
public long filteredDuration()Returns the duration ms value being filtered.- Returns:
- the current duration filter value in ms (negative value means transactions are not filtered by duration)
-
filteredTransactionalIdPattern
Returns transactional ID being filtered.- Returns:
- the current transactional ID pattern filter (empty means no transactional IDs are filtered and all transactions will be returned)
-
toString
-
equals
-
hashCode
public int hashCode()
-