com.gridsystems.nextgrid.api.builder
Class Cache<T>

java.lang.Object
  extended by com.gridsystems.nextgrid.api.builder.Cache<T>
Type Parameters:
T - The type of objects stored in the cache

public class Cache<T>
extends java.lang.Object

Map from process URIs to OWLIndividuals containing input and output binding information. Each URI can be associated to multiple individuals.

This map is used by OwlsBuilder for constructing the data flow in parsed workflows.

Author:
Rodrigo Ruiz

Nested Class Summary
static class Cache.CacheEntry<T>
          Equivalent to Map.Entry, but this one can be instantiated.
 
Constructor Summary
Cache()
          Creates a new instance.
 
Method Summary
 java.util.Set<Cache.CacheEntry<T>> entrySet()
          Gets a set of entries, each containing the mapping for a single individual.
 void put(java.net.URI key, T item)
          Caches an instance, mapping it to a specified URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cache

public Cache()
Creates a new instance.

Method Detail

put

public void put(java.net.URI key,
                T item)
Caches an instance, mapping it to a specified URI.

Parameters:
key - The URI to map to
item - The individual to cache

entrySet

public java.util.Set<Cache.CacheEntry<T>> entrySet()
Gets a set of entries, each containing the mapping for a single individual.

Unlike the Collection method, the returned set is not linked to the internal map. Changes in any of them have no side effect on the other.

Returns:
A set of mappings from URIs to OWLIndividuals


Copyright © 2006-2008 Grid Systems, S.A.. All Rights Reserved.