|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectcacheRunner.CacheRunner
public class CacheRunner
This class is a command-line application that allows the user to
exercise GemFire's cache
API. The example allows the user to specify a cache.xml
file that specifies a parent region with certain properties and
then allows the user to exercise the cache API
| Constructor Summary | |
|---|---|
CacheRunner()
|
|
| Method Summary | |
|---|---|
(package private) void |
attr(String command)
Prints out the current region attributes |
(package private) void |
begin(String command)
Begins a transaction in the current thread |
(package private) void |
chrgn(String command)
Changes the current region to another as specified by command. |
(package private) void |
commit(String command)
Commits the transaction associated with the current thread. |
(package private) void |
create(String command)
Creates a new entry in the current region |
(package private) void |
des(String command)
Destroys (local or distributed) a region or entry in the current region. |
(package private) void |
exec(String command)
Executes a Query. |
(package private) void |
forceRolling()
|
(package private) void |
get(String command)
Gets a cached object from the current region and prints out its String value. |
(package private) void |
go()
Prompts the user for input and executes the command accordingly. |
(package private) void |
indexes(String command)
Prints out information about all of the indexes built in the cache. |
(package private) void |
initialize()
Initializes the Cache for this example program. |
(package private) void |
inv(String command)
Invalidates (either local or distributed) a region or region entry depending on the contents of command. |
(package private) void |
load(String command)
Specifies the cache.xml file to use when creating
the Cache. |
(package private) void |
lock(String command)
Locks the current region or an entry in the current region based on the given command. |
(package private) void |
ls(String command)
Lists the contents of the current region. |
(package private) void |
lsAtts(String command)
Lists the map of region attributes templates that are stored in the cache |
static void |
main(String[] args)
Parses the command line and runs the CacheRunner
example. |
(package private) void |
mkidx(String command)
Creates an index. |
(package private) void |
mkrgn(String command)
Creates a new subregion of the current region |
(package private) void |
open(String command)
Opens the Cache and sets the current region to the
"root" region. |
(package private) void |
printEntry(String key,
Object valueBytes)
Prints the key/value pair for an entry This method recognizes a subset of all possible object types. |
(package private) void |
put(String command)
Puts an entry into the current region |
(package private) void |
registerInterest(String command)
Registers interst with the server in the specific key. |
(package private) void |
reset()
Reset the pending region attributes to the current region |
(package private) void |
rmidx(String command)
Removes an index. |
(package private) void |
rollback(String command)
Rolls back the transaction associated with the current thread |
(package private) void |
save()
Save the region attributes of the current region |
void |
setEcho(boolean echo)
Sets whether commands from input should be echoed to output. |
(package private) void |
setExpirationAttr(String command)
Sets an expiration attribute of the current region |
(package private) void |
setRgnAttr(String command)
Sets a region attribute of the current region |
void |
setXmlFile(File xmlFile)
Sets the cache.xml file used to declaratively
initialize the cache in this example. |
(package private) void |
showHelp()
Prints information on how this program should be used. |
(package private) void |
showlocks()
Prints out information about the region entries that are currently locked. |
(package private) void |
status(String command)
Prints out information about the current region |
(package private) void |
unlock(String command)
Unlocks the current region or an entry in the current region based on the given command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheRunner()
| Method Detail |
|---|
void showHelp()
void initialize()
throws Exception
Cache for this example program.
Uses the LoggingCacheListener, LoggingCacheLoader,
and LoggingCacheWriter.
Exceptionpublic void setEcho(boolean echo)
public void setXmlFile(File xmlFile)
cache.xml file used to declaratively
initialize the cache in this example.
public static void main(String[] args)
throws Exception
CacheRunner
example.
Exceptionvoid go()
void exec(String command)
throws QueryException
QueryExceptionQuery
void mkidx(String command)
throws QueryException
QueryException
void rmidx(String command)
throws QueryException
QueryExceptionvoid indexes(String command)
void status(String command)
throws CacheException
CacheExceptionRegion.getStatistics()
void mkrgn(String command)
throws CacheException
CacheExceptionRegion.createSubregion(java.lang.String, com.gemstone.gemfire.cache.RegionAttributes)void showlocks()
void lock(String command)
command.
Region.getRegionDistributedLock(),
Region.getDistributedLock(java.lang.Object)void unlock(String command)
command.
Lock.unlock()
void chrgn(String command)
throws CacheException
command.
CacheExceptionCache.getRegion(java.lang.String),
Region.getSubregion(java.lang.String),
Region.getParentRegion()void inv(String command) throws CacheException
command.
CacheExceptionRegion.invalidateRegion(),
Region.invalidate(Object)
void reset()
throws CacheException
CacheException
void save()
throws CacheException
CacheException
void attr(String command)
throws CacheException
CacheExceptionRegion.getAttributes()
void registerInterest(String command)
throws CacheException
CacheExceptionRegion.registerInterest(Object)void get(String command) throws CacheException
String value.
CacheExceptionRegion.get(Object)
void create(String command)
throws CacheException
CacheExceptionRegion.create(Object, Object)void put(String command) throws CacheException
CacheExceptionRegion.put(Object, Object)void des(String command) throws CacheException
CacheExceptionRegion.destroyRegion()void ls(String command) throws CacheException
CacheExceptionRegion.entries(boolean)
void lsAtts(String command)
throws CacheException
CacheException
void printEntry(String key,
Object valueBytes)
void setExpirationAttr(String command)
throws Exception
ExceptionRegion.getAttributesMutator()
void setRgnAttr(String command)
throws Exception
ExceptionsetExpirationAttr(java.lang.String),
Region.getAttributesMutator()
void load(String command)
throws CacheException
cache.xml file to use when creating
the Cache. If the Cache has already
been open, then the existing one is closed.
CacheExceptionCacheFactory.create(com.gemstone.gemfire.distributed.DistributedSystem)
void open(String command)
throws Exception
Cache and sets the current region to the
"root" region.
ExceptionCache.getRegion(java.lang.String)void begin(String command)
void commit(String command)
TransactionListener.
void rollback(String command)
void forceRolling()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||