PageRenderTime 28ms CodeModel.GetById 21ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/cacheManagement/examples/root/event/Event.cfc

http://coldfusioncachemanager.googlecode.com/
ColdFusion CFScript | 46 lines | 35 code | 11 blank | 0 comment | 0 complexity | dee520c0d0f8d726812a9f37d01724b1 MD5 | raw file
 1<cfcomponent output="false">
 2	
 3	<cffunction name="init" access="public" returntype="Event" output="false">
 4		<cfargument name="facade" type="Any" required="true" />
 5		<cfset variables.facade = arguments.facade />
 6		
 7		<cfset variables.facade.setValue( 'onCacheAdded', arrayNew(1) ) />
 8		<cfset variables.facade.setValue( 'onCacheRemoved', arrayNew(1) ) />
 9		<cfset variables.facade.setValue( 'onElementPut', arrayNew(1) ) />
10		<cfset variables.facade.setValue( 'onElementExpired', arrayNew(1) ) />
11		<cfset variables.facade.setValue( 'onElementRemoved', arrayNew(1) ) />
12		<cfset variables.facade.setValue( 'onElementsRemoveAll', arrayNew(1) ) />
13		
14		<cfreturn this />
15	</cffunction>
16	
17	<cffunction name="appendMessage" access="private" returntype="void" output="false">
18		<cfargument name="type" type="String" required="true" />
19		<cfset variables.facade.getValue( arguments.type ).add( "-" & dateFormat( now(), 'dd-mm-yyyy' ) & "-" & timeFormat( now(), 'hh-mm-ss-ms' ) &  "<br />") />
20	</cffunction>
21	
22	<cffunction name="onCacheAdded" access="public" returntype="Any" output="false">
23		<cfset appendMessage( 'onCacheAdded' ) />	
24	</cffunction>
25	
26	<cffunction name="onCacheRemoved" access="public" returntype="Any" output="false">
27		<cfset appendMessage( 'onCacheRemoved' ) />	
28	</cffunction>
29	
30	<cffunction name="onElementPut" access="public" returntype="Any" output="false">
31		<cfset appendMessage( 'onElementPut' ) />	
32	</cffunction>
33	
34	<cffunction name="onElementExpired" access="public" returntype="Any" output="false">
35		<cfset appendMessage( 'onElementExpired' ) />
36	</cffunction>
37	
38	<cffunction name="onElementRemoved" access="public" returntype="Any" output="false">
39		<cfset appendMessage( 'onElementRemoved' ) />
40	</cffunction>
41	
42	<cffunction name="onElementsRemoveAll" access="public" returntype="Any" output="false">
43		<cfset appendMessage( 'onElementsRemoveAll' ) />	
44	</cffunction>
45
46</cfcomponent>