org.jppf.task.storage
Interface DataProvider

All Superinterfaces:
Serializable
All Known Implementing Classes:
ClientDataProvider, MemoryMapDataProvider

public interface DataProvider
extends Serializable

Instances of this class provide a way for tasks to share common data. The objective is to avoid data duplication through marshaling/unmarshaling of the data, which can cause crashes due to insufficient available memory in a node.

Author:
Laurent Cohen

Method Summary
 Object getValue(Object key)
          Get a value specified by its key.
 void setValue(Object key, Object value)
          Set a value specified by its key in the store.
 

Method Detail

getValue

Object getValue(Object key)
                throws Exception
Get a value specified by its key.

Parameters:
key - the key identifying the value to retrieve in the store.
Returns:
the value as an Object.
Throws:
Exception - if an error occured while retrieving the data.

setValue

void setValue(Object key,
              Object value)
              throws Exception
Set a value specified by its key in the store.

Parameters:
key - the key identifying the value to retrieve in the store.
value - the value to store, associated with the key.
Throws:
Exception - if an error occured setting the data.


Copyright © 2005-2010 JPPF Team.