org.jboss.ejb3.cache.impl
Class FileObjectStore<T extends Identifiable>

java.lang.Object
  extended by org.jboss.ejb3.cache.impl.FileObjectStore<T>
All Implemented Interfaces:
ObjectStore<T>

public class FileObjectStore<T extends Identifiable>
extends Object
implements ObjectStore<T>

Stores objects in a directory via serialization.

Version:
$Revision: 69058 $
Author:
Carlo de Wolf

Constructor Summary
FileObjectStore()
           
 
Method Summary
protected  File getFile(Object key)
           
 T load(Object key)
          Load the object from storage.
 void setStorageDirectory(String dirName)
           
 void start()
           
 void stop()
           
 void store(T obj)
          Store the object into storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileObjectStore

public FileObjectStore()
Method Detail

getFile

protected File getFile(Object key)

load

public T load(Object key)
Description copied from interface: ObjectStore
Load the object from storage.

Specified by:
load in interface ObjectStore<T extends Identifiable>
Parameters:
key - the object identifier
Returns:
the object or null if not found

setStorageDirectory

public void setStorageDirectory(String dirName)

start

public void start()

stop

public void stop()

store

public void store(T obj)
Description copied from interface: ObjectStore
Store the object into storage.

Specified by:
store in interface ObjectStore<T extends Identifiable>
Parameters:
obj - the object


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.