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

com.nimbusds.infinispan.persistence.ldap.InfinispanEntry Maven / Gradle / Ivy

There is a newer version: 2.1
Show newest version
package com.nimbusds.infinispan.persistence.ldap;


import net.jcip.annotations.Immutable;
import org.infinispan.metadata.InternalMetadata;


/**
 * Encapsulates an Infinispan entry consisting of a key / value pair and
 * associated optional metadata.
 */
@Immutable
public final class InfinispanEntry {
	

	/**
	 * The entry key.
	 */
	private final K key;


	/**
	 * The entry value.
	 */
	private final V value;


	/**
	 * The optional entry metadata.
	 */
	private final InternalMetadata metadata;


	/**
	 * Creates a new Infinispan entry.
	 *
	 * @param key      The entry key. Must not be {@code null}.
	 * @param value    The entry value. {@code null} if none.
	 * @param metadata Optional entry metadata, {@code null} if not
	 *                 specified.
	 */
	public InfinispanEntry(K key, V value, InternalMetadata metadata) {
		assert key != null;
		this.key = key;
		this.value = value;
		this.metadata = metadata;
	}


	/**
	 * Returns the entry key.
	 *
	 * @return The key.
	 */
	public K getKey() {
		return key;
	}


	/**
	 * Returns the entry value.
	 *
	 * @return The value, {@code null} if none.
	 */
	public V getValue() {
		return value;
	}


	/**
	 * Returns the optional entry metadata.
	 *
	 * @return The entry metadata, {@code null} if not specified.
	 */
	public InternalMetadata getMetadata() {
		return metadata;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy