All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.deephacks.tools4j.config.Index Maven / Gradle / Ivy

There is a newer version: 0.15.0
Show newest version
package org.deephacks.tools4j.config;

import org.deephacks.tools4j.config.query.ConfigQuery;
import org.deephacks.tools4j.config.query.ConfigQueryBuilder;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * This annotation is used to mark fields as indexed which is requirement when using
 * {@link ConfigQuery} in order to compose queries.
 *
 * Every indexed field of bean instances are kept on-heap and enable queries with
 * ultra-low latency over many instances.
 *
 * Instances themselves are generally not kept on-heap in order to lower the pressure
 * on garbage collection. Usually instances are cached in direct memory off-heap,
 * as directed by the cache manager. Indexes and caches are automatically kept in sync
 * with bean manager storage as instances are administrated (created, updated, deleted).
 *
 * Note that a CacheManager MUST be available in order to perform queries. It is the
 * CacheManager that store and fetch particular instances from query result sets.
 *
 * @see {@link ConfigQueryBuilder}
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.FIELD })
@Inherited
public @interface Index {
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy