@Service(value="cuba_ScreenProfilerService") public class ScreenProfilerServiceBean extends java.lang.Object implements ScreenProfilerService
Modifier and Type | Class and Description |
---|---|
protected class |
ScreenProfilerServiceBean.EventsClusterListener |
protected static class |
ScreenProfilerServiceBean.ProfilerEventData |
protected class |
ScreenProfilerServiceBean.ProfilingConfigurationClusterListener |
protected static class |
ScreenProfilerServiceBean.ProfilingConfigurationMsg |
protected static class |
ScreenProfilerServiceBean.SendEventsDataMsg |
Modifier and Type | Field and Description |
---|---|
protected ClusterManagerAPI |
clusterManager |
protected Configuration |
configuration |
protected boolean |
enabled |
protected java.util.Queue<ScreenProfilerServiceBean.ProfilerEventData> |
events |
protected Metadata |
metadata |
protected ScreenProfilerConfig |
screenProfilerConfig |
protected long |
timeThreshold |
protected java.util.Set<java.util.UUID> |
userIds |
NAME
Constructor and Description |
---|
ScreenProfilerServiceBean() |
Modifier and Type | Method and Description |
---|---|
protected void |
addEventData(ScreenProfilerServiceBean.ProfilerEventData eventData) |
void |
clearEvents() |
void |
disableProfiling() |
void |
enableProfiling(java.util.Set<java.util.UUID> userIds,
long timeThreshold) |
protected ScreenProfilerServiceBean.ProfilerEventData |
extractEventData(ScreenProfilerEvent event) |
java.util.List<ScreenProfilerEvent> |
getProfilerEvents() |
long |
getTimeThreshold() |
java.util.Set<java.util.UUID> |
getUserIds() |
void |
init() |
boolean |
isProfilingEnabled() |
boolean |
isProfilingEnabledForUser(java.util.UUID userId) |
protected boolean |
needStoreEvent(ScreenProfilerEvent event) |
void |
saveEvents(java.util.List<ScreenProfilerEvent> events) |
@Inject protected Metadata metadata
@Inject protected Configuration configuration
@Inject protected ClusterManagerAPI clusterManager
protected ScreenProfilerConfig screenProfilerConfig
protected volatile boolean enabled
protected volatile java.util.Set<java.util.UUID> userIds
protected volatile long timeThreshold
protected java.util.Queue<ScreenProfilerServiceBean.ProfilerEventData> events
@PostConstruct public void init()
public boolean isProfilingEnabled()
isProfilingEnabled
in interface ScreenProfilerService
public long getTimeThreshold()
getTimeThreshold
in interface ScreenProfilerService
public java.util.Set<java.util.UUID> getUserIds()
getUserIds
in interface ScreenProfilerService
public boolean isProfilingEnabledForUser(java.util.UUID userId)
isProfilingEnabledForUser
in interface ScreenProfilerService
public void enableProfiling(java.util.Set<java.util.UUID> userIds, long timeThreshold)
enableProfiling
in interface ScreenProfilerService
public void disableProfiling()
disableProfiling
in interface ScreenProfilerService
public void saveEvents(java.util.List<ScreenProfilerEvent> events)
saveEvents
in interface ScreenProfilerService
public java.util.List<ScreenProfilerEvent> getProfilerEvents()
getProfilerEvents
in interface ScreenProfilerService
public void clearEvents()
clearEvents
in interface ScreenProfilerService
protected ScreenProfilerServiceBean.ProfilerEventData extractEventData(ScreenProfilerEvent event)
protected boolean needStoreEvent(ScreenProfilerEvent event)
protected void addEventData(ScreenProfilerServiceBean.ProfilerEventData eventData)