diff --git a/amazon_kclpy/kcl.py b/amazon_kclpy/kcl.py index 794c6a6..bb6896c 100644 --- a/amazon_kclpy/kcl.py +++ b/amazon_kclpy/kcl.py @@ -1,4 +1,4 @@ -# Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). # You may not use this file except in compliance with the License. @@ -222,13 +222,13 @@ def shutdown(self, checkpointer, reason): @abc.abstractmethod def shutdown_requested(self, checkpointer): - ''' - Called by a KCLProcess instance to indicate that this record processor is being shutdown. - And it gives an opportunity for record processor to checkpoint before shutdown. + """ + Called by a KCLProcess instance to indicate that this record processor is about to be be shutdown. This gives + the record processor a chance to checkpoint, before the lease is terminated. - :type checkpointer: amazon_kclpy.kcl.Checkpointer - :param checkpointer: A checkpointer which accepts a sequence number or no parameters. - ''' + :type checkpointer: amazon_kclpy.kcl.Checkpointer + :param checkpointer: A checkpointer which accepts a sequence number or no parameters. + """ pass version = 1 diff --git a/amazon_kclpy/messages.py b/amazon_kclpy/messages.py index 35791e0..c21b936 100644 --- a/amazon_kclpy/messages.py +++ b/amazon_kclpy/messages.py @@ -1,4 +1,4 @@ -# Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). # You may not use this file except in compliance with the License. @@ -210,6 +210,7 @@ def dispatch(self, checkpointer, record_processor): self._checkpointer = checkpointer record_processor.shutdown(self) + class ShutdownRequestedInput(MessageDispatcher): """ Used to tell the record processor it will be shutdown. diff --git a/amazon_kclpy/v2/processor.py b/amazon_kclpy/v2/processor.py index b9aeb0d..1c4193f 100644 --- a/amazon_kclpy/v2/processor.py +++ b/amazon_kclpy/v2/processor.py @@ -1,4 +1,4 @@ -# Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# Copyright 2014-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). # You may not use this file except in compliance with the License. @@ -75,12 +75,13 @@ def shutdown(self, shutdown_input): @abc.abstractmethod def shutdown_requested(self, shutdown_requested_input): - ''' - Called by a KCLProcess instance to indicate that this record processor is being shutdown. - And it gives an opportunity for record processor to checkpoint before shutdown. + """ + Called by a KCLProcess instance to indicate that this record processor is about to be be shutdown. This gives + the record processor a chance to checkpoint, before the lease is terminated. - :param amazon_kclpy.messages.ShutdownRequestedInput shutdown_requested_input: Information related to shutdown requested. - ''' + :param amazon_kclpy.messages.ShutdownRequestedInput shutdown_requested_input: + Information related to shutdown requested. + """ pass version = 2