org.javalite.activejdbc.cache
Class CacheEvent

java.lang.Object
  extended by org.javalite.activejdbc.cache.CacheEvent

public class CacheEvent
extends Object

Event object. Sent to CacheManager to let it know of cache purge events.

Author:
Igor Polevoy

Nested Class Summary
static class CacheEvent.CacheEventType
           
 
Field Summary
static CacheEvent ALL
           
 
Constructor Summary
CacheEvent(String source)
          Creates a new event type of CacheEvent.CacheEventType.ALL
CacheEvent(String group, String source)
          Creates a new event type of CacheEvent.CacheEventType.GROUP.
 
Method Summary
 String getGroup()
           
 String getSource()
           
 CacheEvent.CacheEventType getType()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALL

public static final CacheEvent ALL
Constructor Detail

CacheEvent

public CacheEvent(String group,
                  String source)
Creates a new event type of CacheEvent.CacheEventType.GROUP. Usually an application creates an instance of this event to clear a group of caches for a table.

Parameters:
group - name of group (usually name of table), cannot be null.
source - string representation of source of event, whatever that means for the application. This event will be broadcast to listeners, and they might use this piece of information. Can be null.

CacheEvent

public CacheEvent(String source)
Creates a new event type of CacheEvent.CacheEventType.ALL

Parameters:
source - string representation of source of event, whatever that means for the application. This event will be broadcast to listeners, and they might use this piece of information. Can be null.
Method Detail

getSource

public String getSource()

getType

public CacheEvent.CacheEventType getType()

getGroup

public String getGroup()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 JavaLite. All rights reserved.