org.codehaus.wadi.impl
Class DiscMotable
java.lang.Object
org.codehaus.wadi.impl.SimpleEvictable
org.codehaus.wadi.impl.AbstractMotable
org.codehaus.wadi.impl.DiscMotable
- All Implemented Interfaces:
- Evictable, Motable, Serializable, StoreMotable
- public class DiscMotable
- extends AbstractMotable
- implements StoreMotable
- See Also:
- Serialized Form
Methods inherited from class org.codehaus.wadi.impl.SimpleEvictable |
checkTimeframe, copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, isNew, mote, setLastAccessedTime, setMaxInactiveInterval |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.codehaus.wadi.Evictable |
checkTimeframe, copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, isNew, mote, setLastAccessedTime, setMaxInactiveInterval |
_log
protected static final Log _log
_config
protected DiscMotableConfig _config
_file
protected File _file
_bodyLength
protected int _bodyLength
_offset
protected long _offset
DiscMotable
public DiscMotable()
init
public void init(StoreMotableConfig config)
- Specified by:
init
in interface StoreMotable
init
public void init(StoreMotableConfig config,
String name)
throws Exception
- Specified by:
init
in interface StoreMotable
- Throws:
Exception
getBodyAsByteArray
public byte[] getBodyAsByteArray()
throws Exception
- Specified by:
getBodyAsByteArray
in interface Motable
- Throws:
Exception
setBodyAsByteArray
public void setBodyAsByteArray(byte[] body)
throws Exception
- Specified by:
setBodyAsByteArray
in interface Motable
- Throws:
Exception
getBodyAsByteBuffer
public ByteBuffer getBodyAsByteBuffer()
throws Exception
- Specified by:
getBodyAsByteBuffer
in interface Motable
- Throws:
Exception
setBodyAsByteBuffer
public void setBodyAsByteBuffer(ByteBuffer body)
throws Exception
- Specified by:
setBodyAsByteBuffer
in interface Motable
- Throws:
Exception
destroy
public void destroy()
throws Exception
- Specified by:
destroy
in interface Evictable
- Overrides:
destroy
in class AbstractMotable
- Throws:
Exception
destroy
public void destroy(Motable recipient)
throws Exception
- Throws:
Exception
ensureFile
protected void ensureFile()
loadHeader
protected long loadHeader()
loadBody
public Object loadBody(boolean useNIO)
throws Exception
- Throws:
Exception
store
protected void store(boolean useNIO,
Object body)
throws Exception
- Throws:
Exception
Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.