Interface Metadata

All Superinterfaces:
Serializable
All Known Subinterfaces:
DataProvider, JobMetadata, TaskBundle
All Known Implementing Classes:
AbstractNotificationBundle, JPPFJobMetadata, JPPFTaskBundle, MemoryMapDataProvider, MetadataImpl, NotificationBundle

public interface Metadata extends Serializable
A generic dictionary of metadata.
Author:
Laurent Cohen
  • Method Details

    • getParameter

      <T> T getParameter(Object key)
      Retrieve a parameter in the metadata.
      Type Parameters:
      T - the type of the value to get.
      Parameters:
      key - the parameter's key.
      Returns:
      the parameter's value or null if no parameter with the specified key exists.
    • getParameter

      <T> T getParameter(Object key, T def)
      Retrieve a parameter in the metadata.
      Type Parameters:
      T - the type of the value to get.
      Parameters:
      key - the parameter's key.
      def - a default value to return if no parameter with the specified key can be found.
      Returns:
      the parameter's value or null if no parameter with the specified key exists.
    • setParameter

      Metadata setParameter(Object key, Object value)
      Set a parameter in the metadata. If a parameter with the same key already exists, its value is replaced with the new one.
      Parameters:
      key - the parameter's key.
      value - the parameter's value.
      Returns:
      this metadata object, for method chaining.
    • removeParameter

      <T> T removeParameter(Object key)
      Remove a parameter from the metadata.
      Type Parameters:
      T - the type of the value to remove.
      Parameters:
      key - the parameter's key.
      Returns:
      the removed parameter's value or null if no parameter with the specified key exists.
    • hasParameter

      boolean hasParameter(Object key)
      Determine whether this metadata container has a parameter with the specified key.
      Parameters:
      key - the key to lookup in this metadata container.
      Returns:
      true if this metadata has an entry with the specified key, false otherwise.
    • getAll

      Map<Object,Object> getAll()
      Get a copy of the metadata map.
      Returns:
      a map of the metadata contained in this object.
    • clear

      Metadata clear()
      Clear the underlying map.
      Returns:
      this metadata object, for method chaining.