Java Doc for RegisteredEventListeners.java in  » Cache » ehcache » net » sf » ehcache » event » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Cache » ehcache » net.sf.ehcache.event 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.sf.ehcache.event.RegisteredEventListeners

RegisteredEventListeners
public class RegisteredEventListeners (Code)
Registered listeners for registering and unregistering CacheEventListeners and multicasting notifications to registrants.

There is one of these per Cache.

This class also has counters to accumulate the numbers of each type of event for statistics purposes.
author:
   Greg Luck
version:
   $Id: RegisteredEventListeners.java 558 2007-10-29 07:14:38Z gregluck $




Constructor Summary
public  RegisteredEventListeners(Ehcache cache)
    

Method Summary
public  voidclearCounters()
    
final public  voiddispose()
     Tell listeners to dispose themselves.
final public  SetgetCacheEventListeners()
    
public  longgetElementsEvictedCounter()
     Gets the number of events, irrespective of whether there are any registered listeners.
public  longgetElementsExpiredCounter()
     Gets the number of events, irrespective of whether there are any registered listeners.
public  longgetElementsPutCounter()
     Gets the number of events, irrespective of whether there are any registered listeners.
public  longgetElementsRemoveAllCounter()
     Gets the number of events, irrespective of whether there are any registered listeners.
public  longgetElementsRemovedCounter()
     Gets the number of events, irrespective of whether there are any registered listeners.
public  longgetElementsUpdatedCounter()
     Gets the number of events, irrespective of whether there are any registered listeners.
final public  booleanhasCacheEventListeners()
     Returns whether or not at least one cache event listeners has been registered.
public  voidnotifyElementEvicted(Element element, boolean remoteEvent)
    
final public  voidnotifyElementExpiry(Element element, boolean remoteEvent)
    
final public  voidnotifyElementPut(Element element, boolean remoteEvent)
    
final public  voidnotifyElementRemoved(Element element, boolean remoteEvent)
    
final public  voidnotifyElementUpdated(Element element, boolean remoteEvent)
    
public  voidnotifyRemoveAll(boolean remoteEvent)
    
final public  booleanregisterListener(CacheEventListener cacheEventListener)
     Adds a listener to the notification service.
final public  StringtoString()
     Returns a string representation of the object.
final public  booleanunregisterListener(CacheEventListener cacheEventListener)
     Removes a listener from the notification service.


Constructor Detail
RegisteredEventListeners
public RegisteredEventListeners(Ehcache cache)(Code)
Constructs a new notification service
Parameters:
  cache -




Method Detail
clearCounters
public void clearCounters()(Code)
Clears all event counters



dispose
final public void dispose()(Code)
Tell listeners to dispose themselves. Because this method is only ever called from a synchronized cache method, it does not itself need to be synchronized.



getCacheEventListeners
final public Set getCacheEventListeners()(Code)
Gets a list of the listeners registered to this class a list of type CacheEventListener



getElementsEvictedCounter
public long getElementsEvictedCounter()(Code)
Gets the number of events, irrespective of whether there are any registered listeners. the number of events since cache creation or last clearing of counters



getElementsExpiredCounter
public long getElementsExpiredCounter()(Code)
Gets the number of events, irrespective of whether there are any registered listeners. the number of events since cache creation or last clearing of counters



getElementsPutCounter
public long getElementsPutCounter()(Code)
Gets the number of events, irrespective of whether there are any registered listeners. the number of events since cache creation or last clearing of counters



getElementsRemoveAllCounter
public long getElementsRemoveAllCounter()(Code)
Gets the number of events, irrespective of whether there are any registered listeners. the number of events since cache creation or last clearing of counters



getElementsRemovedCounter
public long getElementsRemovedCounter()(Code)
Gets the number of events, irrespective of whether there are any registered listeners. the number of events since cache creation or last clearing of counters



getElementsUpdatedCounter
public long getElementsUpdatedCounter()(Code)
Gets the number of events, irrespective of whether there are any registered listeners. the number of events since cache creation or last clearing of counters



hasCacheEventListeners
final public boolean hasCacheEventListeners()(Code)
Returns whether or not at least one cache event listeners has been registered. true if a one or more listeners have registered, otherwise false



notifyElementEvicted
public void notifyElementEvicted(Element element, boolean remoteEvent)(Code)
Notifies all registered listeners, in no guaranteed order, that an element has been evicted from the cache
Parameters:
  element - the Element to perform the notification on
Parameters:
  remoteEvent - whether the event came from a remote cache peer
See Also:   CacheEventListener.notifyElementEvicted



notifyElementExpiry
final public void notifyElementExpiry(Element element, boolean remoteEvent)(Code)
Notifies all registered listeners, in no guaranteed order, that an element has expired
Parameters:
  element - the Element to perform the notification on
Parameters:
  remoteEvent - whether the event came from a remote cache peer
See Also:   CacheEventListener.notifyElementExpired



notifyElementPut
final public void notifyElementPut(Element element, boolean remoteEvent) throws CacheException(Code)
Notifies all registered listeners, in no guaranteed order, that an element was put into the cache
Parameters:
  element -
Parameters:
  remoteEvent - whether the event came from a remote cache peer
See Also:   CacheEventListener.notifyElementPut(net.sf.ehcache.Ehcachenet.sf.ehcache.Element)



notifyElementRemoved
final public void notifyElementRemoved(Element element, boolean remoteEvent) throws CacheException(Code)
Notifies all registered listeners, in no guaranteed order, that an element was removed
Parameters:
  element -
Parameters:
  remoteEvent - whether the event came from a remote cache peer
See Also:   CacheEventListener.notifyElementRemoved



notifyElementUpdated
final public void notifyElementUpdated(Element element, boolean remoteEvent)(Code)
Notifies all registered listeners, in no guaranteed order, that an element in the cache was updated
Parameters:
  element -
Parameters:
  remoteEvent - whether the event came from a remote cache peer
See Also:   CacheEventListener.notifyElementPut(net.sf.ehcache.Ehcachenet.sf.ehcache.Element)



notifyRemoveAll
public void notifyRemoveAll(boolean remoteEvent)(Code)
Notifies all registered listeners, in no guaranteed order, that removeAll has been called and all elements cleared
Parameters:
  remoteEvent - whether the event came from a remote cache peer
See Also:   CacheEventListener.notifyElementEvicted



registerListener
final public boolean registerListener(CacheEventListener cacheEventListener)(Code)
Adds a listener to the notification service. No guarantee is made that listeners will be notified in the order they were added.
Parameters:
  cacheEventListener - true if the listener is being added and was not already added



toString
final public String toString()(Code)
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. a string representation of the object.



unregisterListener
final public boolean unregisterListener(CacheEventListener cacheEventListener)(Code)
Removes a listener from the notification service.
Parameters:
  cacheEventListener - true if the listener was present



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2010 - 2030 Java Source and Support. All rights reserved.
All other trademarks are property of their respective owners.