Java 类com.amazonaws.services.simpleworkflow.flow.annotations.ExponentialRetry 实例源码

项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Void> announceFinished(final String name,
        final Promise<?>... waitFor) {
    return this.announcer.announceFinished(name);
}
项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Void> announceInjury(final String name,
        final Promise<?>... waitFor) {
    return this.announcer.announceInjury(name);
}
项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Void> announceLap(final String name, final int lap,
        final Promise<?>... waitFor) {
    return this.announcer.announceLap(name, lap);
}
项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Void> announceMissing(final String name,
        final Promise<?>... waitFor) {
    return this.announcer.announceMissing(name);
}
项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Void> announcePlace(final String name, final Integer place,
        final Promise<?>... waitFor) {
    return this.announcer.announcePlace(name, place);
}
项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Void> announceRace(final Promise<List<String>> horses,
        final Promise<Integer> laps, final Promise<?>... waitFor) {

    return this.announcer.announceRace(horses, laps);

}
项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Void> arriveGate(final String name,
        final Promise<?>... waitFor) {
    return this.horses.arriveGate(name);
}
项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Status> runLap(final String name, final int lapNum,
        final Promise<?>... waitFor) {
    return this.horses.runLap(name, lapNum);
}
项目:aws-flow-maven-eclipse-samples    文件:AverageCalculatorActivities.java   
@ExponentialRetry(initialRetryIntervalSeconds = 10, maximumAttempts = 10)
int computeSumForChunk(String bucketName, String filename, int chunkNumber, int chunkSize) throws IOException;
项目:datamung    文件:ControlActivities.java   
@Description( value = "Create role $params.get(0) with permission to SWF task list $params.get(1) that caller account can assume", result = "Role with ARN $output" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
String createAgentControllerRole( String roleName, String workflowTaskList,
                                  Identity clientIdentity );
项目:datamung    文件:ControlActivities.java   
@Description( value = "Determine UserData of worker EC2 instance" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
String createAgentUserData( String roleArn, String workflowTaskList );
项目:datamung    文件:ControlActivities.java   
@Description( value = "Determine temporary database instance name for snapshot $params.get(0)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
String createDatabaseName( String snapshotName );
项目:datamung    文件:ControlActivities.java   
@Description( value = "Determine snapshot name of database instance $params.get(0)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
String createSnapshotName( String databaseName );
项目:datamung    文件:ControlActivities.java   
@Description( "Delete role $params.get(0)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void deleteRole( String roleName );
项目:datamung    文件:ControlActivities.java   
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void notifyActionCompleted( String actionId, String result,
                            long elapsedMillis );
项目:datamung    文件:ControlActivities.java   
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void notifyActionFailed( String actionId, String result,
                         String failureDetails, long elaspsedMillis );
项目:datamung    文件:ControlActivities.java   
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
String notifyActionStarted( String actionName, String description );
项目:datamung    文件:ControlActivities.java   
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void notifyJobCompleted();
项目:datamung    文件:ControlActivities.java   
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void notifyJobFailed( Throwable e );
项目:datamung    文件:ControlActivities.java   
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void notifyJobStarted();
项目:datamung    文件:RdsActivities.java   
@Description( "Create database snapshot $params.get(0) from RDS instance $params.get(1)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void createSnapshot( String snapshotName, String instanceName,
                     Identity identity );
项目:datamung    文件:RdsActivities.java   
@Description( "Delete database snapshot $params.get(0)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void deleteSnapshot( String snapshotName, Identity identity );
项目:datamung    文件:RdsActivities.java   
@Description( value = "Check status of RDS instance $params.get(0)", result = "$output.instanceStatus" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
DatabaseInstance describeInstance( String instanceName, Identity identity );
项目:datamung    文件:RdsActivities.java   
@Description( value = "Check status of database snapshot $params.get(0)", result = "$output" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
String getSnapshotStatus( String snapshotName, Identity identity );
项目:datamung    文件:RdsActivities.java   
@Description( "Restore RDS instance $params.get(1) from database snapshot $params.get(0) in subnet $params.get(2)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
DatabaseInstance restoreSnapshot( String snapshotName, String instanceName,
                                  String subnetId, Identity identity );
项目:datamung    文件:RdsActivities.java   
@Description( "Terminate RDS instance $params.get(0)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void terminateInstance( String instanceName, Identity identity );
项目:datamung    文件:Ec2Activities.java   
@Description( "Create instance profile $params.get(0) under caller's account with permission to assume role $params.get(1)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void createAgentInstanceProfile( String profileName,
                                 String controllerRoleArn, Identity identity );
项目:datamung    文件:Ec2Activities.java   
@Description( "Delete instance profile $params.get(0)" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void deleteInstanceProfile( String profileName, Identity identity );
项目:datamung    文件:Ec2Activities.java   
@Description( value = "Check status of EC2 instance $params.get(0)", result = "$output.instanceStatus" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
WorkerInstance describeInstance( String instanceId, Identity identity );
项目:datamung    文件:Ec2Activities.java   
@Description( value = "Launch EC2 instance with under caller's account with instance profile $params.get(0).getInstanceProfileName()", result = "EC2 instance $output" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
String launchInstance( CreateInstanceOptions options, Identity identity );
项目:datamung    文件:Ec2Activities.java   
@Description( "Terminate EC2 instance $params.get(0) under caller's account" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
void terminateInstance( String instanceId, Identity identity );
项目:datamung    文件:AgentActivities.java   
@Description( value = "Run command from EC2 instance", result = "Job printed out [$output.standardOutput] and returned $output.exitCode after $output.elapsedMillis milliseconds" )
@ExponentialRetry( initialRetryIntervalSeconds = 30, maximumAttempts = 5 )
JobResult runJob( Job job );
项目:swf-starter    文件:StorageActivities.java   
/**
 * Upload a file to storage.
 *
 * @param bucketName Name of the S3 bucket to upload to
 * @param localName  Local name of the file to upload to S3
 * @param remoteName Name of the file to use when uploaded to S3
 */
@ExponentialRetry(initialRetryIntervalSeconds = 10, maximumAttempts = 10)
void upload(String bucketName, String localName, String remoteName);
项目:swf-starter    文件:StorageActivities.java   
/**
 * Download a file from storage.
 *
 * @param bucketName Name of the S3 bucket to download from
 * @param remoteName Name of the file to download from S3
 * @param localName  Local name of the file to download to
 */
@ExponentialRetry(initialRetryIntervalSeconds = 10, maximumAttempts = 10)
String download(String bucketName, String remoteName, String localName) throws Exception;
项目:swf-starter    文件:StorageActivities.java   
/**
 * Delete temporary local files.
 *
 * @param fileName Name of file to delete from temporary folder
 */
@ExponentialRetry(initialRetryIntervalSeconds = 10)
void deleteLocalFile(String fileName);
项目:swf-horserace    文件:RaceFlowImpl.java   
/**
 * Local wrapper for activities client invocation. This lets us specify
 * retry policy that handles failures from workers and from SWF itself. All
 * parameters passed directly to client and return whatever the client
 * returns.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 2, maximumRetryIntervalSeconds = 30, maximumAttempts = 5)
@Asynchronous
private Promise<Void> announceEnd(final Promise<?>... waitFor) {
    return this.announcer.announceEnd();
}
项目:aws-flow-maven-eclipse-samples    文件:ExponentialRetryAnnotationActivities.java   
/**
 * use @ExponentialRetry annotation to define the retry policy. The
 * parameter initialRetryIntervalSeconds indicates the time period to wait
 * for the first retry attempt. The parameter maximumAttempts specifies the
 * number of attempts after which the retry will stop. The exceptionsToRetry
 * parameter indicates that only exceptions in the exceptionsToRetry list
 * will be retried.
 */
@ExponentialRetry(initialRetryIntervalSeconds = 5, maximumAttempts = 5, exceptionsToRetry = IllegalStateException.class)
public void unreliableActivity();
项目:aws-flow-maven-eclipse-samples    文件:SimpleStoreActivities.java   
/**
 * 
 * @param localName
 *          Name of the file to upload from temporary directory
 * @param remoteName
 *          Name of the file to use on S3 bucket after upload
 * @param fromBox
 *          Machine name which has the file that needs to be uploaded
 * @return
 */
@ExponentialRetry(initialRetryIntervalSeconds = 10,  maximumAttempts = 10) 
public void upload(String bucketName, String localName, String targetName);
项目:aws-flow-maven-eclipse-samples    文件:SimpleStoreActivities.java   
/**
 * 
 * @param remoteName 
 *          Name of the file to download from S3 bucket 
 * @param localName
 *          Name of the file used locally after download
 * @param toBox 
 *          This is an output parameter here.  
 *          Used to communicate the name of the box that runs download activity
 */
@ExponentialRetry(initialRetryIntervalSeconds = 10, maximumAttempts = 10)
public String download(String bucketName, String remoteName, String localName) throws Exception;
项目:aws-flow-maven-eclipse-samples    文件:SimpleStoreActivities.java   
/**
 * 
 * @param fileName 
 *          Name of file to delete from temporary folder
 * @param machineName
 *          Machine which has the file locally 
 * @return
 */
@ExponentialRetry(initialRetryIntervalSeconds=10)
public void deleteLocalFile(String fileName);