TimedSemaphore.Builder
- public static class org.apache.commons.lang3.concurrent.TimedSemaphore.Builder implements Supplier<TimedSemaphore>[source]
Builds new
TimedSemaphore.- Since:
3.20.0
Constructors
Constructs a new Builder. |
Methods
Sets the limit. |
|
Sets the time period. |
|
Sets the executor service. |
|
Sets the time unit for the period. |
- @Override public TimedSemaphore get()[source]
- public TimedSemaphore.Builder setLimit(int limit)[source]
Sets the limit.
- Parameters:
limit – The limit.
- Returns:
thisinstance.
- public TimedSemaphore.Builder setPeriod(long period)[source]
Sets the time period.
- Parameters:
period – The time period.
- Returns:
thisinstance.
- public TimedSemaphore.Builder setService(ScheduledExecutorService service)[source]
Sets the executor service.
- Parameters:
service – The executor service.
- Returns:
thisinstance.
- public TimedSemaphore.Builder setTimeUnit(TimeUnit timeUnit)[source]
Sets the time unit for the period.
- Parameters:
timeUnit – The time unit for the period.
- Returns:
thisinstance.