org.codehaus.wadi.impl
Class DatabaseMotable
java.lang.Object
org.codehaus.wadi.impl.SimpleEvictable
org.codehaus.wadi.impl.AbstractMotable
org.codehaus.wadi.impl.DatabaseMotable
- All Implemented Interfaces:
- Evictable, Motable, Serializable, StoreMotable
- public class DatabaseMotable
- extends AbstractMotable
- implements StoreMotable
A Motable that represents its Bytes field as a row in a Shared DataBase table.
- Version:
- $Revision: 1200 $
- Author:
- Jules Gosnell
- 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 DatabaseMotableConfig _config
_connection
protected Connection _connection
DatabaseMotable
public DatabaseMotable()
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
getConnection
public Connection getConnection()
setConnection
public void setConnection(Connection connection)
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
copy
public void copy(Motable motable)
throws Exception
- Specified by:
copy
in interface Motable
- Overrides:
copy
in class AbstractMotable
- Throws:
Exception
mote
public void mote(Motable recipient)
throws Exception
- Specified by:
mote
in interface Motable
- Overrides:
mote
in class AbstractMotable
- 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
store
protected void store(Object body)
throws Exception
- Throws:
Exception
Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.