org.objectweb.cjdbc.controller.cache.result.entries
Class ResultCacheEntryEager

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.cache.result.entries.AbstractResultCacheEntry
      extended byorg.objectweb.cjdbc.controller.cache.result.entries.ResultCacheEntryEager

public class ResultCacheEntryEager
extends AbstractResultCacheEntry

A CacheEntry that is to be recognized as Eager entry.

Version:
1.0
Author:
Nicolas Modrzyk , Emmanuel Cecchet

Field Summary
private  AbstractResultCache cache
           
private  long deadline
           
private  long timeout
           
 
Fields inherited from class org.objectweb.cjdbc.controller.cache.result.entries.AbstractResultCacheEntry
CACHE_DIRTY, CACHE_INVALID, CACHE_VALID, NO_DEADLINE, request, result, state
 
Constructor Summary
ResultCacheEntryEager(AbstractResultCache cache, SelectRequest request, ControllerResultSet result, long timeout)
          Create a new Eager Query Cache entry
 
Method Summary
 long getDeadline()
          Returns the deadline value.
 long getTimeout()
          Returns the timeout value.
 java.lang.String getType()
          Get the type of this entry as a string
 void invalidate()
          Invalidates this cache entry (removes the ResultSet and turn state to AbstractResultCacheEntry.CACHE_INVALID).
 java.lang.String[] toStringTable()
          Get data about this entry
 
Methods inherited from class org.objectweb.cjdbc.controller.cache.result.entries.AbstractResultCacheEntry
getNext, getPrev, getRequest, getResult, getSizeOfResult, getState, isDirty, isValid, markDirty, setNext, setPrev, setResult, setValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

private AbstractResultCache cache

timeout

private long timeout

deadline

private long deadline
Constructor Detail

ResultCacheEntryEager

public ResultCacheEntryEager(AbstractResultCache cache,
                             SelectRequest request,
                             ControllerResultSet result,
                             long timeout)
Create a new Eager Query Cache entry

Parameters:
cache - The query cache we belong to
request - Select request to cache
result - ResultSet to cache
timeout - The timeout to use for the deadline (0 for no timeout)
Method Detail

invalidate

public void invalidate()
Description copied from class: AbstractResultCacheEntry
Invalidates this cache entry (removes the ResultSet and turn state to AbstractResultCacheEntry.CACHE_INVALID).

Specified by:
invalidate in class AbstractResultCacheEntry
See Also:
AbstractResultCacheEntry.invalidate()

getType

public java.lang.String getType()
Description copied from class: AbstractResultCacheEntry
Get the type of this entry as a string

Specified by:
getType in class AbstractResultCacheEntry
Returns:
NoCache or Eager or Relaxed
See Also:
AbstractResultCacheEntry.getType()

toStringTable

public java.lang.String[] toStringTable()
Description copied from class: AbstractResultCacheEntry
Get data about this entry

Specified by:
toStringTable in class AbstractResultCacheEntry
Returns:
an array [request,type,status(valid,notvalid,dirty),deadLine]
See Also:
AbstractResultCacheEntry.toStringTable()

getDeadline

public long getDeadline()
Returns the deadline value.

Returns:
Returns the deadline.

getTimeout

public long getTimeout()
Returns the timeout value.

Returns:
Returns the timeout.


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.