Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.scoja.util
Class ExpiringLRUCache.Shell  view ExpiringLRUCache.Shell download ExpiringLRUCache.Shell.java

java.lang.Object
  extended byorg.scoja.util.ExpiringLRUCache.Shell
All Implemented Interfaces:
LRUShell
Enclosing class:
ExpiringLRUCache

private class ExpiringLRUCache.Shell
extends java.lang.Object
implements LRUShell


Field Summary
protected  boolean computing
           
protected  java.lang.Object key
           
protected  long lastUsage
           
protected  ExpiringLRUCache.Shell next
           
protected  ExpiringLRUCache.Shell prev
           
protected  int usages
           
protected  ExpiringObject value
           
 
Constructor Summary
ExpiringLRUCache.Shell()
           
ExpiringLRUCache.Shell(java.lang.Object key)
           
 
Method Summary
protected  void addUsage()
           
protected  ExpiringObject getCurrentValue()
           
 java.lang.Object getKey()
          Devuelve la clave a la que está asociado este objeto.
protected  long getLastUsageTime()
           
protected  ExpiringLRUCache.Shell getNext()
           
protected  ExpiringLRUCache.Shell getPrevious()
           
protected  int getUsage()
           
 ExpiringObject getValue()
          Devuelve el valor que contiene este objeto y que se supone que es el valor para la clave getKey() 55 .
protected  void linkAfter(ExpiringLRUCache.Shell befo)
           
 void put(ExpiringObject value)
          Pone el valor a value, cuando el objeto está indefinido.
 void release()
          Indica a la caché de la que lo hemos sacado que ya no lo estamos usando y que, por nosotros, puede empezar a pensar en su muerte.
protected  void removeUsage()
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
protected  void unlink()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected final java.lang.Object key

value

protected ExpiringObject value

computing

protected boolean computing

usages

protected int usages

lastUsage

protected long lastUsage

prev

protected ExpiringLRUCache.Shell prev

next

protected ExpiringLRUCache.Shell next
Constructor Detail

ExpiringLRUCache.Shell

public ExpiringLRUCache.Shell()

ExpiringLRUCache.Shell

public ExpiringLRUCache.Shell(java.lang.Object key)
Method Detail

getUsage

protected int getUsage()

getLastUsageTime

protected long getLastUsageTime()

addUsage

protected void addUsage()

removeUsage

protected void removeUsage()

getPrevious

protected ExpiringLRUCache.Shell getPrevious()

getNext

protected ExpiringLRUCache.Shell getNext()

unlink

protected void unlink()

linkAfter

protected void linkAfter(ExpiringLRUCache.Shell befo)

getCurrentValue

protected ExpiringObject getCurrentValue()

getKey

public java.lang.Object getKey()
Description copied from interface: LRUShell
Devuelve la clave a la que está asociado este objeto. Generalmente es un dato redundante, porque se tuvo que conocer para poder buscar este objeto en una cache.

Specified by:
getKey in interface LRUShell

getValue

public ExpiringObject getValue()
Description copied from interface: LRUShell
Devuelve el valor que contiene este objeto y que se supone que es el valor para la clave LRUShell.getKey() 55 . Cuando este objeto no tiene valor asociado, la primera llamada devuelve null y las siguiente se quedan bloqueadas hasta que la primera llama a LRUShell.put(ExpiringObject) 55 o LRUShell.release() 55 .

Specified by:
getValue in interface LRUShell

put

public void put(ExpiringObject value)
         throws java.lang.IllegalStateException
Description copied from interface: LRUShell
Pone el valor a value, cuando el objeto está indefinido. Pero produce una excepción java.lang.IllegalStateException si ya había recibido un valor.

Specified by:
put in interface LRUShell

release

public void release()
Description copied from interface: LRUShell
Indica a la caché de la que lo hemos sacado que ya no lo estamos usando y que, por nosotros, puede empezar a pensar en su muerte.

Specified by:
release in interface LRUShell

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).