org.apache.cocoon.pipeline.caching
Class ObjectCacheValue

java.lang.Object
  extended by org.apache.cocoon.pipeline.caching.AbstractCacheValue
      extended by org.apache.cocoon.pipeline.caching.ObjectCacheValue
All Implemented Interfaces:
Serializable, CacheValue

public class ObjectCacheValue
extends AbstractCacheValue

An implementation of the CacheValue interface that can hold an arbitrary value.

See Also:
Serialized Form

Constructor Summary
ObjectCacheValue(Object value, CacheKey cacheKey)
           
 
Method Summary
 Object getValue()
          
 void setValue(Object value)
          Sets value of this cache
 double size()
          Returns size of this CacheValue in bytes.
 void writeTo(OutputStream outputStream)
          
 
Methods inherited from class org.apache.cocoon.pipeline.caching.AbstractCacheValue
getCacheKey, isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectCacheValue

public ObjectCacheValue(Object value,
                        CacheKey cacheKey)
Method Detail

getValue

public Object getValue()

See Also:
CacheValue.getValue()

setValue

public void setValue(Object value)
Sets value of this cache

See Also:
org.apache.cocoon.pipeline.caching.CacheValue#setValue()

size

public double size()
Returns size of this CacheValue in bytes.

Returns:
size of cached value in bytes or -1 if something goes wrong.
See Also:
CacheValue.size()

writeTo

public void writeTo(OutputStream outputStream)
             throws IOException

Throws:
IOException
See Also:
CacheValue.writeTo(java.io.OutputStream)


Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.