org.exist.xmlrpc
Class AbstractCachedResult

java.lang.Object
  extended by org.exist.xmlrpc.AbstractCachedResult
Direct Known Subclasses:
QueryResult, SerializedResult

public abstract class AbstractCachedResult
extends Object

Simple abstract container for serialized resources or results of a query. Used to cache them that may be retrieved by chunks later by the client.

Author:
wolf, jmfernandez

Constructor Summary
AbstractCachedResult()
           
AbstractCachedResult(long queryTime)
           
 
Method Summary
abstract  void free()
          This abstract method must be used to free internal variables.
 long getCreationTimestamp()
           
 long getQueryTime()
           
abstract  Object getResult()
          This abstract method returns the cached result or null
 long getTimestamp()
           
 void touch()
          This method can be used to explicitly update the last time the cached result has been used
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCachedResult

public AbstractCachedResult()

AbstractCachedResult

public AbstractCachedResult(long queryTime)
Method Detail

getQueryTime

public long getQueryTime()
Returns:
Returns the queryTime.

getTimestamp

public long getTimestamp()
Returns:
Returns the timestamp.

touch

public void touch()
This method can be used to explicitly update the last time the cached result has been used


getCreationTimestamp

public long getCreationTimestamp()
Returns:
Returns the timestamp.

free

public abstract void free()
This abstract method must be used to free internal variables.


getResult

public abstract Object getResult()
This abstract method returns the cached result or null

Returns:
The object which is being cached


Copyright (C) Wolfgang Meier. All rights reserved.