org.openrdf.server.metadata.cache
Class CachedEntity

java.lang.Object
  extended by org.openrdf.server.metadata.cache.CachedEntity

public class CachedEntity
extends Object


Constructor Summary
CachedEntity(File head, File body)
           
CachedEntity(String method, String url, FileResponse store, File head, File body)
           
 
Method Summary
 void addRequest(RequestHeader req)
           
 Long contentLength()
           
 long date()
           
 void delete()
           
 int getAge(long now)
           
 String getContentHeader(String name)
           
 Map<String,String> getContentHeaders()
           
 String getContentLength()
           
 String getContentType()
           
 String getDate()
           
 String getEntityTag()
           
 String getETag()
           
 String getLastModified()
           
 int getLifeTime()
           
 String getMethod()
           
 int getStatus()
           
 String getStatusText()
           
 String getURL()
           
static String getURL(File head)
           
 String getWarning()
           
 boolean isBodyPresent()
           
 boolean isMissing()
           
 boolean isPublic()
           
 boolean isStale()
           
 boolean isVariation(RequestHeader req)
           
 long lastModified()
           
 boolean mustRevalidate()
           
 Lock open()
           
 void setResponse(FileResponse store)
           
 void setStale(boolean stale)
           
 String toString()
           
 void writeBodyTo(OutputStream out, int blockSize)
           
 void writeBodyTo(OutputStream out, int blockSize, long start, long length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CachedEntity

public CachedEntity(File head,
                    File body)
             throws IOException
Throws:
IOException

CachedEntity

public CachedEntity(String method,
                    String url,
                    FileResponse store,
                    File head,
                    File body)
             throws IOException
Throws:
IOException
Method Detail

getURL

public static String getURL(File head)
                     throws IOException
Throws:
IOException

isMissing

public boolean isMissing()

open

public Lock open()
          throws InterruptedException
Throws:
InterruptedException

delete

public void delete()
            throws InterruptedException
Throws:
InterruptedException

addRequest

public void addRequest(RequestHeader req)
                throws IOException
Throws:
IOException

setResponse

public void setResponse(FileResponse store)
                 throws IOException,
                        InterruptedException
Throws:
IOException
InterruptedException

isVariation

public boolean isVariation(RequestHeader req)

mustRevalidate

public boolean mustRevalidate()

getAge

public int getAge(long now)

contentLength

public Long contentLength()

getContentLength

public String getContentLength()

getContentHeader

public String getContentHeader(String name)

getContentHeaders

public Map<String,String> getContentHeaders()

date

public long date()

getDate

public String getDate()

getEntityTag

public String getEntityTag()

getETag

public String getETag()

lastModified

public long lastModified()

getLastModified

public String getLastModified()

getLifeTime

public int getLifeTime()
                throws IOException
Throws:
IOException

getMethod

public String getMethod()

getStatus

public int getStatus()

getStatusText

public String getStatusText()

getURL

public String getURL()

getWarning

public String getWarning()

getContentType

public String getContentType()

isPublic

public boolean isPublic()

isStale

public boolean isStale()

setStale

public void setStale(boolean stale)
              throws IOException
Throws:
IOException

isBodyPresent

public boolean isBodyPresent()

writeBodyTo

public void writeBodyTo(OutputStream out,
                        int blockSize)
                 throws IOException
Throws:
IOException

writeBodyTo

public void writeBodyTo(OutputStream out,
                        int blockSize,
                        long start,
                        long length)
                 throws IOException
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2009 James Leigh Services Inc.. All Rights Reserved.