Key-value Template
The key value is a bridge between the entity and the key-value database.
KeyValueTemplate
KeyValueTemplate
The KeyValueTemplate
is the column template to synchronous tasks. It has three components:
The KeyValueTemplate is responsible for persistency of an entity in a key-value database. It is composed basically for three components.
KeyValueEntityConverter: That converts an entity to communication API, e.g., The Person to KeyValueEntity.
BucketManager: The Diana column key-value entity manager.
KeyValueWorkflow: The workflow to update and save methods.
To use a key-value template just follows the CDI style and put an @Inject
on the field.
The next step is to produce a BucketManager:
To work with more than one key-value Template, there are two approaches:
1) Using qualifieres:
2) Using the KeyValueTemplateProducer class
Last updated