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

java.lang.Object
  extended byorg.objectweb.cjdbc.controller.cache.result.entries.ResultCacheEntry
      extended byorg.objectweb.cjdbc.controller.cache.result.entries.ResultCacheEntryEager
All Implemented Interfaces:
CacheEntry

public class ResultCacheEntryEager
extends ResultCacheEntry

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.ResultCacheEntry
request, result, state
 
Fields inherited from interface org.objectweb.cjdbc.controller.cache.result.entries.CacheEntry
CACHE_DIRTY, CACHE_INVALID, CACHE_VALID, NO_DEADLINE
 
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 CacheEntry.CACHE_INVALID).
 java.lang.String[] toStringTable()
          Get data about this entry
 
Methods inherited from class org.objectweb.cjdbc.controller.cache.result.entries.ResultCacheEntry
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
Method Detail

invalidate

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

Specified by:
invalidate in interface CacheEntry
Specified by:
invalidate in class ResultCacheEntry
See Also:
ResultCacheEntry.invalidate()

getType

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

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

toStringTable

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

Specified by:
toStringTable in interface CacheEntry
Specified by:
toStringTable in class ResultCacheEntry
Returns:
an array [request,type,status(valid,notvalid,dirty),deadLine]
See Also:
ResultCacheEntry.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.