public abstract class LoggingCacheCallback extends Object implements com.gemstone.gemfire.cache.CacheCallback, com.gemstone.gemfire.cache.Declarable
CacheCallbacks that log information about the events
that they receieve. Because this class implements the
Declarable interface, it may be used in a
cache.xml file.| Modifier | Constructor and Description |
|---|---|
protected |
LoggingCacheCallback()
Creates a new
LoggingCacheCallback that logs to
standard out. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
No logging is performed when a callback is closed
|
protected String |
format(com.gemstone.gemfire.cache.EntryEvent event)
Formats an
EntryEvent into a string |
protected String |
format(Object obj)
Formats an arbitrary object into a string
|
void |
init(Properties props)
Initializes this cache callback using data configured in a
cache.xml file. |
protected void |
log(String kind,
com.gemstone.gemfire.cache.EntryEvent event)
Logs information about an
EntryEvent |
protected void |
log(String message,
com.gemstone.gemfire.cache.GemFireCache cache)
Logs a message to either standard out or to the GemFire logger
obtained from the given
GemFireCache. |
protected void |
log(String message,
com.gemstone.gemfire.cache.Region region)
Logs a message to either standard out or to the GemFire logger
obtained from the given
Region. |
protected void |
log(String kind,
com.gemstone.gemfire.cache.RegionEvent event)
Logs information about a
RegionEvent |
protected LoggingCacheCallback()
LoggingCacheCallback that logs to
standard out.public void init(Properties props)
cache.xml file. This callback recognizes the
useGemFireLogger property.init in interface com.gemstone.gemfire.cache.Declarablepublic void close()
close in interface com.gemstone.gemfire.cache.CacheCallbackprotected void log(String message, com.gemstone.gemfire.cache.GemFireCache cache)
GemFireCache.protected void log(String message, com.gemstone.gemfire.cache.Region region)
Region.protected String format(com.gemstone.gemfire.cache.EntryEvent event)
EntryEvent into a stringprotected void log(String kind, com.gemstone.gemfire.cache.EntryEvent event)
EntryEventkind - The kind (update, destroy, etc.) of event to be loggedprotected void log(String kind, com.gemstone.gemfire.cache.RegionEvent event)
RegionEventkind - The kind (destroy, etc.) of event to be loggedCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.