public class DatabaseLoader extends Object implements com.gemstone.gemfire.cache.CacheLoader, com.gemstone.gemfire.cache.Declarable
CacheLoader that simulates a database. The load(com.gemstone.gemfire.cache.LoaderHelper) method recognizes special keys that will "disable" (and
subsequently "enable") the database. The database will not service
requests while it is diabled. (Or rather, it will take longer than
the timeout
interval to service the request.)| Constructor and Description |
|---|
DatabaseLoader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static String |
createNodeFromData(hct.DatabaseLoader.NodeData nd)
Returns an XML encoding of a
NodeData |
void |
init(Properties p) |
Object |
load(com.gemstone.gemfire.cache.LoaderHelper helper)
Loads an object from the "database".
|
public void init(Properties p)
init in interface com.gemstone.gemfire.cache.Declarablepublic void close()
close in interface com.gemstone.gemfire.cache.CacheCallbackpublic Object load(com.gemstone.gemfire.cache.LoaderHelper helper) throws com.gemstone.gemfire.cache.CacheLoaderException
given
number of milliseconds.load in interface com.gemstone.gemfire.cache.CacheLoadercom.gemstone.gemfire.cache.CacheLoaderExceptionDatabaseLoaderpublic static String createNodeFromData(hct.DatabaseLoader.NodeData nd)
NodeDataCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.