Uses of Class
com.twitter.common.quantity.Time

Packages that use Time
com.twitter.common.application.modules   
com.twitter.common.args.parsers   
com.twitter.common.base   
com.twitter.common.logging   
com.twitter.common.metrics   
com.twitter.common.net.monitoring   
com.twitter.common.net.pool   
com.twitter.common.quantity   
com.twitter.common.stats   
com.twitter.common.thrift   
com.twitter.common.thrift.callers   
com.twitter.common.util   
com.twitter.common.util.concurrent   
com.twitter.common.util.testing   
com.twitter.common.zookeeper   
com.twitter.common.zookeeper.testing   
 

Uses of Time in com.twitter.common.application.modules
 

Methods in com.twitter.common.application.modules that return types with arguments of type Time
static Amount<Long,Time> StatsModule.getSamplingInterval()
           
 

Uses of Time in com.twitter.common.args.parsers
 

Methods in com.twitter.common.args.parsers that return types with arguments of type Time
static Amount<Long,Time> DurationParser.parse(String spec)
          Parses a duration of the form "1d23h59m59s" (as well as subvariants, i.e.
 

Uses of Time in com.twitter.common.base
 

Constructor parameters in com.twitter.common.base with type arguments of type Time
CachingSupplier(Supplier<T> wrapped, Amount<Long,Time> expiration)
          Creates a new caching supplier.
 

Uses of Time in com.twitter.common.logging
 

Method parameters in com.twitter.common.logging with type arguments of type Time
 BufferedLog.Builder<T,R> BufferedLog.Builder.withFlushInterval(Amount<Integer,Time> flushInterval)
          Specifies the maximum amount of time that a log entry may wait in the buffer before an attempt is made to flush the buffer.
 

Uses of Time in com.twitter.common.metrics
 

Method parameters in com.twitter.common.metrics with type arguments of type Time
 void MetricPoller.start(Amount<Long,Time> pollInterval)
          Initiates the poller.
 

Constructor parameters in com.twitter.common.metrics with type arguments of type Time
Rate(String name, Supplier<T> valueAccessor, Amount<Long,Time> windowLength)
          Creates a rate using a supplier to access values.
 

Uses of Time in com.twitter.common.net.monitoring
 

Constructor parameters in com.twitter.common.net.monitoring with type arguments of type Time
TrafficMonitor(String serviceName, Amount<Long,Time> gcInterval)
          Creates a new traffic monitor with a custom cleanup interval.
 

Uses of Time in com.twitter.common.net.pool
 

Fields in com.twitter.common.net.pool with type parameters of type Time
static Amount<Long,Time> ObjectPool.NO_TIMEOUT
          A convenience constant representing a no timeout.
 

Method parameters in com.twitter.common.net.pool with type arguments of type Time
 S ConnectionFactory.create(Amount<Long,Time> timeout)
          Attempts to create a new connection within the given timeout and subject to this factory's connection population size policy.
 S ConnectionPool.get(Amount<Long,Time> timeout)
           
 T ObjectPool.get(Amount<Long,Time> timeout)
          Gets a resource; timing out if there are none available and it takes longer than specified to create a new one or wait for one to be released.
 Connection<T,E> DynamicPool.get(Amount<Long,Time> timeout)
           
 Connection<T,E> MetaPool.get(Amount<Long,Time> timeout)
           
 

Constructor parameters in com.twitter.common.net.pool with type arguments of type Time
DynamicPool(DynamicHostSet<H> hostSet, Function<E,ObjectPool<Connection<T,E>>> endpointPoolFactory, LoadBalancer<E> loadBalancer, Closure<Collection<E>> onBackendsChosen, Amount<Long,Time> restoreInterval, Function<H,E> endpointExtractor, Predicate<H> livenessChecker)
          Creates a new ServerSetConnectionPool and blocks on an initial read and constructions of pools for the given serverSet.
MetaPool(ImmutableMap<E,ObjectPool<Connection<T,E>>> backends, LoadBalancer<E> loadBalancer, Closure<Collection<E>> onBackendsChosen, Amount<Long,Time> restoreInterval)
          Creates a connection pool that balances connections across multiple backend pools.
MetaPool(LoadBalancer<E> loadBalancer, Closure<Collection<E>> onBackendsChosen, Amount<Long,Time> restoreInterval)
          Creates a connection pool with no backends.
 

Uses of Time in com.twitter.common.quantity
 

Methods in com.twitter.common.quantity that return Time
static Time Time.valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Time[] Time.values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 

Uses of Time in com.twitter.common.stats
 

Constructors in com.twitter.common.stats with parameters of type Time
Elapsed(String name, Time granularity)
          Creates and exports a new stat that maintains the difference between the system clock time and the time since it was last reset.
PipelineStats(String pipelineName, Set<String> stages, Time precision)
          Creates a new pipeline tracker with the given pipeline name and stages.
 

Constructor parameters in com.twitter.common.stats with type arguments of type Time
NumericStatExporter(Closure<Map<String,? extends Number>> exportSink, ScheduledExecutorService executor, Amount<Long,Time> exportInterval)
          Creates a new numeric stat exporter that will export to the specified sink.
TimeSeriesRepositoryImpl(Amount<Long,Time> samplePeriod, Amount<Long,Time> retentionPeriod)
           
TimeSeriesRepositoryImpl(Amount<Long,Time> samplePeriod, Amount<Long,Time> retentionPeriod)
           
 

Uses of Time in com.twitter.common.thrift
 

Methods in com.twitter.common.thrift that return types with arguments of type Time
 Amount<Long,Time> Config.getConnectTimeout()
          Returns the maximum time to wait for a connection to be established.
 Amount<Long,Time> Config.getRequestTimeout()
          Returns the maximum time to wait for any thrift call to complete.
 Amount<Integer,Time> ThriftServer.ServerSetup.getSocketTimeout()
           
 

Method parameters in com.twitter.common.thrift with type arguments of type Time
 void ThriftServer.awaitShutdown(Amount<Long,Time> timeout)
          Attempts to shut down this server, and waits for the shutdown operation to complete.
 Connection<org.apache.thrift.transport.TTransport,InetSocketAddress> ThriftConnectionFactory.create(Amount<Long,Time> timeout)
          FIXME: shouldn't this throw TimeoutException instead of returning null in the timeout cases as per the ConnectionFactory.create javadoc?
 T Config.AbstractBuilder.withConnectTimeout(Amount<Long,Time> timeout)
          Assigns the timeout for all connections established with the blocking client.
 ThriftFactory<T> ThriftFactory.withDeadConnectionRestoreInterval(Amount<Long,Time> connectionRestoreInterval)
          Specifies the interval at which dead endpoint connections should be checked and revived.
 T Config.AbstractBuilder.withRequestTimeout(Amount<Long,Time> timeout)
          Specifies that all calls be subject to a global timeout.
 ThriftFactory<T> ThriftFactory.withSocketTimeout(Amount<Long,Time> socketTimeout)
          Specifies the net read/write timeout to set via SO_TIMEOUT on the thrift blocking client or AsyncClient.setTimeout on the thrift async client.
 

Constructor parameters in com.twitter.common.thrift with type arguments of type Time
ThriftConnectionFactory(InetSocketAddress endpoint, int maxConnections, ThriftConnectionFactory.TransportType transportType, Amount<Long,Time> socketTimeout)
          Creates a thrift connection factory.
ThriftConnectionFactory(InetSocketAddress endpoint, int maxConnections, ThriftConnectionFactory.TransportType transportType, Amount<Long,Time> socketTimeout, Closure<Connection<org.apache.thrift.transport.TTransport,InetSocketAddress>> postCreateCallback, boolean sslTransport)
           
ThriftConnectionFactory(String host, int port, int maxConnections, ThriftConnectionFactory.TransportType transportType, Amount<Long,Time> socketTimeout)
          Creates a thrift connection factory.
ThriftServer.ServerSetup(int port, org.apache.thrift.TProcessor processor, org.apache.thrift.protocol.TProtocolFactory protoFactory, int numThreads, Amount<Integer,Time> socketTimeout)
           
ThriftServer.ServerSetup(String name, int port, org.apache.thrift.TProcessor processor, org.apache.thrift.protocol.TProtocolFactory protoFactory, int numThreads, Amount<Integer,Time> socketTimeout)
           
ThriftServer.ServerSetup(String name, int port, org.apache.thrift.TProcessor processor, org.apache.thrift.protocol.TProtocolFactory protoFactory, int numThreads, Amount<Integer,Time> socketTimeout, TrafficMonitor<InetSocketAddress> monitor)
           
ThriftServer.ServerSetup(String name, int port, org.apache.thrift.TProcessor processor, org.apache.thrift.protocol.TProtocolFactory protoFactory, int numThreads, int queueSize, Amount<Integer,Time> socketTimeout)
           
ThriftServer.ServerSetup(String name, int port, org.apache.thrift.TProcessor processor, org.apache.thrift.protocol.TProtocolFactory protoFactory, int numThreads, int queueSize, Amount<Integer,Time> socketTimeout, TrafficMonitor<InetSocketAddress> monitor)
           
 

Uses of Time in com.twitter.common.thrift.callers
 

Fields in com.twitter.common.thrift.callers with type parameters of type Time
static Amount<Long,Time> RetryingCaller.NONBLOCKING_TIMEOUT
           
 

Method parameters in com.twitter.common.thrift.callers with type arguments of type Time
 Object Caller.call(Method method, Object[] args, org.apache.thrift.async.AsyncMethodCallback callback, Amount<Long,Time> connectTimeoutOverride)
          Invokes a method on an object, using the given arguments.
 Object StatTrackingCaller.call(Method method, Object[] args, org.apache.thrift.async.AsyncMethodCallback callback, Amount<Long,Time> connectTimeoutOverride)
           
 Object DebugCaller.call(Method method, Object[] args, org.apache.thrift.async.AsyncMethodCallback callback, Amount<Long,Time> connectTimeoutOverride)
           
 Object RetryingCaller.call(Method method, Object[] args, org.apache.thrift.async.AsyncMethodCallback callback, Amount<Long,Time> connectTimeoutOverride)
           
 Object DeadlineCaller.call(Method method, Object[] args, org.apache.thrift.async.AsyncMethodCallback callback, Amount<Long,Time> connectTimeoutOverride)
           
 Object ThriftCaller.call(Method method, Object[] args, org.apache.thrift.async.AsyncMethodCallback callback, Amount<Long,Time> connectTimeoutOverride)
           
 

Constructor parameters in com.twitter.common.thrift.callers with type arguments of type Time
DeadlineCaller(Caller decoratedCaller, boolean async, ExecutorService executorService, Amount<Long,Time> timeout)
          Creates a new deadline caller.
ThriftCaller(ObjectPool<Connection<org.apache.thrift.transport.TTransport,InetSocketAddress>> connectionPool, RequestTracker<InetSocketAddress> requestTracker, Function<org.apache.thrift.transport.TTransport,T> clientFactory, Amount<Long,Time> timeout, boolean debug)
          Creates a new thrift caller.
 

Uses of Time in com.twitter.common.util
 

Method parameters in com.twitter.common.util with type arguments of type Time
 void RateLimitedCommandExecutor.execute(String name, ExceptionalCommand task, Class exceptionClass, int numTries, Amount<Long,Time> retryDelay)
           
 void CommandExecutor.execute(String name, ExceptionalCommand task, Class exceptionClass, int maxTries, Amount<Long,Time> retryDelay)
          Enqueue a task to be executed with retry semantics defined.
 BackoffDecider.Builder BackoffDecider.Builder.withRecoveryPeriod(Amount<Long,Time> recoveryPeriod)
          Overrides the default recovery period behavior.
 BackoffDecider.Builder BackoffDecider.Builder.withRequestWindow(Amount<Long,Time> requestWindow)
          Sets the time window over which to analyze failures.
 

Constructor parameters in com.twitter.common.util with type arguments of type Time
BackoffHelper(Amount<Long,Time> initialBackoff, Amount<Long,Time> maxBackoff)
          Creates a new BackoffHelper that uses truncated binary backoff starting at the given initialBackoff and maxing out at the given maxBackoff.
BackoffHelper(Amount<Long,Time> initialBackoff, Amount<Long,Time> maxBackoff)
          Creates a new BackoffHelper that uses truncated binary backoff starting at the given initialBackoff and maxing out at the given maxBackoff.
BackoffHelper(Amount<Long,Time> initialBackoff, Amount<Long,Time> maxBackoff, boolean stopAtMax)
          Creates a new BackoffHelper that uses truncated binary backoff starting at the given initialBackoff and maxing out at the given maxBackoff.
BackoffHelper(Amount<Long,Time> initialBackoff, Amount<Long,Time> maxBackoff, boolean stopAtMax)
          Creates a new BackoffHelper that uses truncated binary backoff starting at the given initialBackoff and maxing out at the given maxBackoff.
RateLimitedCommandExecutor(ScheduledExecutorService taskExecutor, Amount<Long,Time> intervalBetweenRequests, Runnable queueDrainer, BlockingQueue<RetryingRunnable> blockingQueue)
          Create a CommandExecutor that executes enquequed tasks in the task executor with specified interval between executions.
RetryingRunnable(String name, ExceptionalCommand<E> task, Class<E> exceptionClass, int numTries, Amount<Long,Time> retryDelay, CommandExecutor commandExecutor)
          Create a Task with name name that executes at most numTries in case of failure with an interval of retryDelay between attempts and sets tryNum to be the first (=1).
RetryingRunnable(String name, ExceptionalCommand<E> task, Class<E> exceptionClass, int numTries, Amount<Long,Time> retryDelay, CommandExecutor commandExecutor, int tryNum)
          Create a Task with name name that executes at most numTries in case of failure with an interval of retryDelay between attempts.
TruncatedBinaryBackoff(Amount<Long,Time> initialBackoff, Amount<Long,Time> maxBackoff)
          Same as main constructor, but this will always return true from shouldContinue().
TruncatedBinaryBackoff(Amount<Long,Time> initialBackoff, Amount<Long,Time> maxBackoff)
          Same as main constructor, but this will always return true from shouldContinue().
TruncatedBinaryBackoff(Amount<Long,Time> initialBackoff, Amount<Long,Time> maxBackoff, boolean stopAtMax)
          Creates a new TruncatedBinaryBackoff that will start by backing off for initialBackoff and then backoff of twice as long each time its called until reaching the maxBackoff at which point shouldContinue() will return false and any future backoffs will always wait for that amount of time.
TruncatedBinaryBackoff(Amount<Long,Time> initialBackoff, Amount<Long,Time> maxBackoff, boolean stopAtMax)
          Creates a new TruncatedBinaryBackoff that will start by backing off for initialBackoff and then backoff of twice as long each time its called until reaching the maxBackoff at which point shouldContinue() will return false and any future backoffs will always wait for that amount of time.
 

Uses of Time in com.twitter.common.util.concurrent
 

Constructor parameters in com.twitter.common.util.concurrent with type arguments of type Time
ExecutorServiceShutdown(ExecutorService executor, Amount<Long,Time> gracePeriod)
          Creates a new ExecutorServiceShutdown command that will try to gracefully shut down the given executor when executed.
 

Uses of Time in com.twitter.common.util.testing
 

Method parameters in com.twitter.common.util.testing with type arguments of type Time
 void FakeClock.advance(Amount<Long,Time> period)
          Advances the current time by millis milliseconds.
 

Uses of Time in com.twitter.common.zookeeper
 

Fields in com.twitter.common.zookeeper with type parameters of type Time
static Amount<Integer,Time> ZooKeeperUtils.DEFAULT_ZK_SESSION_TIMEOUT
          An appropriate default session timeout for Twitter ZooKeeper clusters.
 

Method parameters in com.twitter.common.zookeeper with type arguments of type Time
 org.apache.zookeeper.ZooKeeper ZooKeeperClient.get(Amount<Long,Time> connectionTimeout)
          Returns the current active ZK connection or establishes a new one if none has yet been established or a previous connection was disconnected or had its session time out.
 

Constructor parameters in com.twitter.common.zookeeper with type arguments of type Time
ZooKeeperClient(Amount<Integer,Time> sessionTimeout, InetSocketAddress zooKeeperServer, InetSocketAddress... zooKeeperServers)
          Creates an unconnected client that will lazily attempt to connect on the first call to ZooKeeperClient.get().
ZooKeeperClient(Amount<Integer,Time> sessionTimeout, Iterable<InetSocketAddress> zooKeeperServers)
          Creates an unconnected client that will lazily attempt to connect on the first call to ZooKeeperClient.get().
ZooKeeperClient(Amount<Integer,Time> sessionTimeout, ZooKeeperClient.Credentials credentials, InetSocketAddress zooKeeperServer, InetSocketAddress... zooKeeperServers)
          Creates an unconnected client that will lazily attempt to connect on the first call to ZooKeeperClient.get().
ZooKeeperClient(Amount<Integer,Time> sessionTimeout, ZooKeeperClient.Credentials credentials, Iterable<InetSocketAddress> zooKeeperServers)
          Creates an unconnected client that will lazily attempt to connect on the first call to ZooKeeperClient.get().
 

Uses of Time in com.twitter.common.zookeeper.testing
 

Fields in com.twitter.common.zookeeper.testing with type parameters of type Time
static Amount<Integer,Time> ZooKeeperTestServer.DEFAULT_SESSION_TIMEOUT
          The default session timeout for clients created by servers constructed with ZooKeeperTestServer.ZooKeeperTestServer(int, ShutdownRegistry).
 

Method parameters in com.twitter.common.zookeeper.testing with type arguments of type Time
 ZooKeeperClient ZooKeeperTestServer.createClient(Amount<Integer,Time> sessionTimeout)
          Returns a new unauthenticated zookeeper client connected to the in-process zookeeper server with a custom sessionTimeout.
 ZooKeeperClient ZooKeeperTestServer.createClient(Amount<Integer,Time> sessionTimeout, ZooKeeperClient.Credentials credentials)
          Returns a new authenticated zookeeper client connected to the in-process zookeeper server with a custom sessionTimeout.
protected  ZooKeeperClient BaseZooKeeperTest.createZkClient(Amount<Integer,Time> sessionTimeout)
          Returns a new unauthenticated zookeeper client connected to the in-process zookeeper server with a custom sessionTimeout.
protected  ZooKeeperClient BaseZooKeeperTest.createZkClient(Amount<Integer,Time> sessionTimeout, ZooKeeperClient.Credentials credentials)
          Returns a new authenticated zookeeper client connected to the in-process zookeeper server with a custom sessionTimeout.
 

Constructor parameters in com.twitter.common.zookeeper.testing with type arguments of type Time
BaseZooKeeperTest(Amount<Integer,Time> defaultSessionTimeout)
          Creates a test case where the test server uses the given defaultSessionTimeout for clients created without an explicit session timeout.
ZooKeeperTestServer(int port, ShutdownRegistry shutdownRegistry, Amount<Integer,Time> defaultSessionTimeout)