public void put( Object key, Object val, IElementAttributes attr )
throws CacheException
{
if ( key == null )
{
throw new CacheException( "Key must not be null" );
}
else if ( val == null )
{
throw new CacheException( "Value must not be null" );
}
// Create the element and update. This may throw an IOException which
// should be wrapped by cache access.
try
{
CacheElement ce = new CacheElement( cacheControl.getCacheName(),
(Serializable) key,
(Serializable) val );
ce.setElementAttributes( attr );
cacheControl.update( ce );
}
catch ( Exception e )
{
throw new CacheException( e );
}
}