public interface TwillRunner
TwillRunnable
and TwillApplication
.Modifier and Type | Interface and Description |
---|---|
static interface |
TwillRunner.LiveInfo
Interface to represents information of a live application.
|
Modifier and Type | Method and Description |
---|---|
Iterable<TwillController> |
lookup(String applicationName)
Gets an
Iterable of TwillController for all running instances of the given application. |
TwillController |
lookup(String applicationName,
RunId runId)
Gets a
TwillController for the given application and runId. |
Iterable<TwillRunner.LiveInfo> |
lookupLive()
Gets an
Iterable of TwillRunner.LiveInfo . |
TwillPreparer |
prepare(TwillApplication application)
Prepares to run the given
TwillApplication as specified by the application. |
TwillPreparer |
prepare(TwillRunnable runnable)
Prepares to run the given
TwillRunnable with ResourceSpecification.BASIC resource specification. |
TwillPreparer |
prepare(TwillRunnable runnable,
ResourceSpecification resourceSpecification)
Prepares to run the given
TwillRunnable with the given resource specification. |
Cancellable |
scheduleSecureStoreUpdate(SecureStoreUpdater updater,
long initialDelay,
long delay,
TimeUnit unit)
Deprecated.
|
Cancellable |
setSecureStoreRenewer(SecureStoreRenewer renewer,
long initialDelay,
long delay,
long retryDelay,
TimeUnit unit)
Sets and schedules a periodic renewal of
SecureStore using a given SecureStoreRenewer . |
TwillPreparer prepare(TwillRunnable runnable)
TwillRunnable
with ResourceSpecification.BASIC
resource specification.
The name for the runnable will be defaulted to runnable.getClass().getSimpleName()
runnable
- The runnable to run through Twill when TwillPreparer.start()
is called.TwillPreparer
for setting up runtime options.TwillPreparer prepare(TwillRunnable runnable, ResourceSpecification resourceSpecification)
TwillRunnable
with the given resource specification. The name for the runnable
will be defaulted to runnable.getClass().getSimpleName()
runnable
- The runnable to run through Twill when TwillPreparer.start()
is called.resourceSpecification
- The resource specification for running the runnable.TwillPreparer
for setting up runtime options.TwillPreparer prepare(TwillApplication application)
TwillApplication
as specified by the application.application
- The application to run through Twill when TwillPreparer.start()
is called.TwillPreparer
for setting up runtime options.TwillController lookup(String applicationName, RunId runId)
TwillController
for the given application and runId.applicationName
- Name of the application.runId
- The runId of the running application.TwillController
to interact with the application or null if no such runId is found.Iterable<TwillController> lookup(String applicationName)
Iterable
of TwillController
for all running instances of the given application.applicationName
- Name of the application.Iterable
that gives the latest TwillController
set for all running
instances of the application when Iterable.iterator()
is invoked.Iterable<TwillRunner.LiveInfo> lookupLive()
Iterable
of TwillRunner.LiveInfo
.Iterable
that gives the latest information on the set of applications that
have running instances when Iterable.iterator()
} is invoked.@Deprecated Cancellable scheduleSecureStoreUpdate(SecureStoreUpdater updater, long initialDelay, long delay, TimeUnit unit)
setSecureStoreRenewer(SecureStoreRenewer, long, long, long, TimeUnit)
instead.SecureStoreUpdater
will be made
after initialDelay
, and subsequently with the given delay
between completion of one update
and starting of the next. If exception is thrown on call
SecureStoreUpdater.update(String, RunId)
, the exception will only get logged
and won't suppress the next update call.updater
- A SecureStoreUpdater
for creating new SecureStore.initialDelay
- Delay before the first call to update method.delay
- Delay between completion of one update call to the next one.unit
- time unit for the initialDelay and delay.Cancellable
for cancelling the scheduled update.Cancellable setSecureStoreRenewer(SecureStoreRenewer renewer, long initialDelay, long delay, long retryDelay, TimeUnit unit)
SecureStore
using a given SecureStoreRenewer
.
There is always only one active SecureStoreRenewer
. Setting a new renewer will replace the old one
and setting up a new schedule.renewer
- a SecureStoreRenewer
for renewing SecureStore
for all applications.initialDelay
- delay before the first call to renew method.delay
- the delay between successful completion of one renew call to the next one.retryDelay
- the delay before the retrying the renewal if the call
to SecureStoreRenewer.renew(String, RunId, SecureStoreWriter)
raised exception.unit
- time unit for the initialDelay and period.Copyright © 2013-2016 The Apache Software Foundation. All rights reserved.