Skip to content

Extensions

Ankit Nanglia edited this page Sep 3, 2018 · 20 revisions

Kronos enables custom implementations of its pluggable components. There are few out of the box extensions that are available. Please refer these before implementing a custom one.

Out of the box extensions

Building a custom extension

The user needs to download the release package and add it to the development environment (IDE) during the custom implementation. The following components are available for user implementation.

Task Handler

A handler is used to execute the submitted task. At runtime, a singleton instance of a handler is created per executor and is used to execute the submitted tasks.

A custom handler needs to implement the TaskHandler interface. To configure the handler refer link.

Note: A handler instance is created only once and then used to execute the submitted tasks. While writing a custom handler user needs to assure that the handler is not maintaining any state. If required, handlers need to take care of distinguishing state across these submitted tasks.

Queue

A queue is used to exchange message between the scheduler and executor.

Custom queue needs to implement two interfaces - Producer.java and Consumer.java used by kronos to produce and consume messages. To configure a custom queue refer link.

Store

A store is used to persist the current state of Kronos.

A custom store needs to implement :

To configure a custom store refer link.

Timeout Policy

Policies can be defined to apply in case of task times out.

A timeout policy needs to implement the TimeoutPolicy interface. To configure a timeout policy refer link.