|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.services.stats.ThreadFiringStatsRecorder
public final class ThreadFiringStatsRecorder
Stats recorder implementation which on receipt of each stats recording event fires a new thread tasked with notifying the child recorder of the event. This accomplishes processing stats recording in a new thread rather than in the thread in which the event was generated. This IStatsRecorder just fires the threads - it requires a target IStatsRecorder which the threads will invoke. You inject this target via the setTargetStatsRecorder() setter method.
Field Summary | |
---|---|
private org.apache.commons.logging.Log |
log
|
private IStatsRecorder |
targetStatsRecorder
|
private edu.emory.mathcs.backport.java.util.concurrent.ExecutorService |
threadPool
|
Constructor Summary | |
---|---|
ThreadFiringStatsRecorder(int initialThreads,
int maxThreads,
int threadPriority)
Constructor specifying configurating of our thread pool. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
private void |
executeStatsRecorderEvent(StatsRecorderWorkerTask task)
|
IStatsRecorder |
getTargetStatsRecorder()
Get the target IStatsRecorder which the threads we fire will invoke when they awake. |
void |
recordChannelAddedToLayout(IPerson person,
UserProfile profile,
IUserLayoutChannelDescription channelDesc)
Called when a channel is being added to a user layout |
void |
recordChannelDefinitionModified(IPerson person,
ChannelDefinition channelDef)
Called when a user modifies an existing channel |
void |
recordChannelDefinitionPublished(IPerson person,
ChannelDefinition channelDef)
Called when a user publishes a channel |
void |
recordChannelDefinitionRemoved(IPerson person,
ChannelDefinition channelDef)
Called when a user removes an existing channel |
void |
recordChannelInstantiated(IPerson person,
UserProfile profile,
IUserLayoutChannelDescription channelDesc)
Called when a channel is being instantiated |
void |
recordChannelMovedInLayout(IPerson person,
UserProfile profile,
IUserLayoutChannelDescription channelDesc)
Called when a channel is being moved in a user layout |
void |
recordChannelRemovedFromLayout(IPerson person,
UserProfile profile,
IUserLayoutChannelDescription channelDesc)
Called when a channel is being removed from a user layout |
void |
recordChannelRendered(IPerson person,
UserProfile profile,
IUserLayoutChannelDescription channelDesc)
Called when a channel is being rendered |
void |
recordChannelTargeted(IPerson person,
UserProfile profile,
IUserLayoutChannelDescription channelDesc)
Called when a channel is being targeted |
void |
recordChannelUpdatedInLayout(IPerson person,
UserProfile profile,
IUserLayoutChannelDescription channelDesc)
Called when a channel is being updated in a user layout |
void |
recordFolderAddedToLayout(IPerson person,
UserProfile profile,
IUserLayoutFolderDescription folderDesc)
Called when a folder is being added to a user layout |
void |
recordFolderMovedInLayout(IPerson person,
UserProfile profile,
IUserLayoutFolderDescription folderDesc)
Called when a folder is being moved in a user layout |
void |
recordFolderRemovedFromLayout(IPerson person,
UserProfile profile,
IUserLayoutFolderDescription folderDesc)
Called when a folder is being removed from a user layout |
void |
recordFolderUpdatedInLayout(IPerson person,
UserProfile profile,
IUserLayoutFolderDescription folderDesc)
Called when a folder is being updated in a user layout |
void |
recordLogin(IPerson person)
Called when user authenticates successfully. |
void |
recordLogout(IPerson person)
Called when user logs out. |
void |
recordSessionCreated(IPerson person)
Called when a new session is created for a user. |
void |
recordSessionDestroyed(IPerson person)
Called when the user's session is destroyed. |
void |
setTargetStatsRecorder(IStatsRecorder targetStatsRecorder)
Set the child IStatsRecorder which the threads we fire will invoke when they awake. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private org.apache.commons.logging.Log log
private IStatsRecorder targetStatsRecorder
private edu.emory.mathcs.backport.java.util.concurrent.ExecutorService threadPool
Constructor Detail |
---|
public ThreadFiringStatsRecorder(int initialThreads, int maxThreads, int threadPriority)
initialThreads
- initial number of threads in the thread poolmaxThreads
- maximum number of threads to allow in the thread poolthreadPriority
- priority for the threads.Method Detail |
---|
public void recordLogin(IPerson person)
IStatsRecorder
recordLogin
in interface IStatsRecorder
person
- the IPerson objectpublic void recordLogout(IPerson person)
IStatsRecorder
recordLogout
in interface IStatsRecorder
person
- the IPerson objectpublic void recordSessionCreated(IPerson person)
IStatsRecorder
recordSessionCreated
in interface IStatsRecorder
person
- the IPerson objectpublic void recordSessionDestroyed(IPerson person)
IStatsRecorder
recordSessionDestroyed
in interface IStatsRecorder
person
- the IPerson objectpublic void recordChannelDefinitionPublished(IPerson person, ChannelDefinition channelDef)
IStatsRecorder
recordChannelDefinitionPublished
in interface IStatsRecorder
person
- the person pubishing the channelchannelDef
- the channel being publishedpublic void recordChannelDefinitionModified(IPerson person, ChannelDefinition channelDef)
IStatsRecorder
recordChannelDefinitionModified
in interface IStatsRecorder
person
- the person modifying the channelchannelDef
- the channel being modifiedpublic void recordChannelDefinitionRemoved(IPerson person, ChannelDefinition channelDef)
IStatsRecorder
recordChannelDefinitionRemoved
in interface IStatsRecorder
person
- the person removing the channelchannelDef
- the channel being removedpublic void recordChannelAddedToLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
IStatsRecorder
recordChannelAddedToLayout
in interface IStatsRecorder
person
- the person adding the channelprofile
- the profile of the layout to which the channel is addedchannelDesc
- the channel being subscribed topublic void recordChannelUpdatedInLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
IStatsRecorder
recordChannelUpdatedInLayout
in interface IStatsRecorder
person
- the person updating the channelprofile
- the profile of the layout in which the channel is updatedchannelDesc
- the channel being updatedpublic void recordChannelMovedInLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
IStatsRecorder
recordChannelMovedInLayout
in interface IStatsRecorder
person
- the person moving the channelprofile
- the profile of the layout in which the channel is movedchannelDesc
- the channel being movedpublic void recordChannelRemovedFromLayout(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
IStatsRecorder
recordChannelRemovedFromLayout
in interface IStatsRecorder
person
- the person removing the channelprofile
- the profile of the layout to which the channel is removedchannelDesc
- the channel being removed from a user layoutpublic void recordFolderAddedToLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)
IStatsRecorder
recordFolderAddedToLayout
in interface IStatsRecorder
person
- the person adding the folderprofile
- the profile of the layout to which the folder is addedfolderDesc
- the folder being subscribed topublic void recordFolderUpdatedInLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)
IStatsRecorder
recordFolderUpdatedInLayout
in interface IStatsRecorder
person
- the person updating the folderprofile
- the profile of the layout in which the folder is updatedfolderDesc
- the folder being updatedpublic void recordFolderMovedInLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)
IStatsRecorder
recordFolderMovedInLayout
in interface IStatsRecorder
person
- the person moving the folderprofile
- the profile of the layout in which the folder is movedfolderDesc
- the folder being movedpublic void recordFolderRemovedFromLayout(IPerson person, UserProfile profile, IUserLayoutFolderDescription folderDesc)
IStatsRecorder
recordFolderRemovedFromLayout
in interface IStatsRecorder
person
- the person removing the folderprofile
- the profile of the layout to which the folder is removedfolderDesc
- the folder being removed from a user layoutpublic void recordChannelInstantiated(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
IStatsRecorder
recordChannelInstantiated
in interface IStatsRecorder
person
- the person instantiating the channelprofile
- the profile of the layout in which this channel is instantiatedchannelDesc
- the channel being instantiatedpublic void recordChannelRendered(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
IStatsRecorder
recordChannelRendered
in interface IStatsRecorder
person
- the person rendering the channelprofile
- the profile of the layout in which this channel is renderedchannelDesc
- the channel being renderedpublic void recordChannelTargeted(IPerson person, UserProfile profile, IUserLayoutChannelDescription channelDesc)
IStatsRecorder
recordChannelTargeted
in interface IStatsRecorder
person
- the person interacting with the channelprofile
- the profile of the layout in which this channel resideschannelDesc
- the channel being targetedprivate void executeStatsRecorderEvent(StatsRecorderWorkerTask task)
public IStatsRecorder getTargetStatsRecorder()
public void setTargetStatsRecorder(IStatsRecorder targetStatsRecorder)
targetStatsRecorder
- The targetStatsRecorder to set.public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |