Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for a Graceful Shutdown of the Worker #109

Merged
merged 5 commits into from
Oct 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
import java.util.List;

import com.amazonaws.services.kinesis.model.Record;
import com.amazonaws.services.kinesis.clientlibrary.types.ShutdownReason;
import com.amazonaws.services.kinesis.clientlibrary.lib.worker.ShutdownReason;

/**
* The Amazon Kinesis Client Library will instantiate record processors to process data records fetched from Amazon
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.amazonaws.services.kinesis.clientlibrary.interfaces.v2;

import com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorCheckpointer;

/**
* Allows a record processor to indicate it's aware of requested shutdowns, and handle the request.
*/
public interface IShutdownNotificationAware {

/**
* Called when the worker has been requested to shutdown, and gives the record processor a chance to checkpoint.
*
* The record processor will still have shutdown called.
*
* @param checkpointer the checkpointer that can be used to save progress.
*/
void shutdownRequested(IRecordProcessorCheckpointer checkpointer);

}
Loading