org.apache.wicket.pageStore
Class AsynchronousDataStore

java.lang.Object
  extended by org.apache.wicket.pageStore.AsynchronousDataStore
All Implemented Interfaces:
IDataStore

public class AsynchronousDataStore
extends Object
implements IDataStore

Facade for IDataStore that does the actual saving in worker thread.

Author:
Matej Knopp

Constructor Summary
AsynchronousDataStore(IDataStore dataStore)
          Construct.
 
Method Summary
 void destroy()
          Properly close the data store and possibly open resource handles
 byte[] getData(String sessionId, int id)
          Get data associated with the session id and page id.
protected  int getMaxQueuedEntries()
           
 boolean isReplicated()
           
 void removeData(String sessionId)
          Remove all page data for the session id
 void removeData(String sessionId, int id)
          Remove all persisted data related to the session id and page id
 void storeData(String sessionId, int id, byte[] data)
          Store the page data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsynchronousDataStore

public AsynchronousDataStore(IDataStore dataStore)
Construct.

Parameters:
dataStore -
Method Detail

destroy

public void destroy()
Description copied from interface: IDataStore
Properly close the data store and possibly open resource handles

Specified by:
destroy in interface IDataStore
See Also:
IDataStore.destroy()

getData

public byte[] getData(String sessionId,
                      int id)
Description copied from interface: IDataStore
Get data associated with the session id and page id.

Specified by:
getData in interface IDataStore
Parameters:
sessionId - Session ID
id - Page ID
Returns:
All the page data persisted
See Also:
IDataStore.getData(java.lang.String, int)

isReplicated

public boolean isReplicated()
Specified by:
isReplicated in interface IDataStore
Returns:
whether the data store is replicated
See Also:
IDataStore.isReplicated()

getMaxQueuedEntries

protected int getMaxQueuedEntries()
Returns:
max queue size

removeData

public void removeData(String sessionId,
                       int id)
Description copied from interface: IDataStore
Remove all persisted data related to the session id and page id

Specified by:
removeData in interface IDataStore
Parameters:
sessionId - Session ID
id - Page ID
See Also:
IDataStore.removeData(java.lang.String, int)

removeData

public void removeData(String sessionId)
Description copied from interface: IDataStore
Remove all page data for the session id

Specified by:
removeData in interface IDataStore
Parameters:
sessionId - Session ID
See Also:
IDataStore.removeData(java.lang.String)

storeData

public void storeData(String sessionId,
                      int id,
                      byte[] data)
Description copied from interface: IDataStore
Store the page data

Specified by:
storeData in interface IDataStore
Parameters:
sessionId - Session ID
id - Page ID
data - Page data
See Also:
IDataStore.storeData(java.lang.String, int, byte[])


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.