info.magnolia.module.exchangesimple.monitor
Interface ActivationStorage

All Known Subinterfaces:
ActivationMonitorMBean
All Known Implementing Classes:
ActivationMonitor, MemoryActivationStorage

public interface ActivationStorage

Interface providing methods to store informations about activation.


Method Summary
 void addActivationTime(long time)
          Adds time needed for activation to complete.
 void addCommitedTransaction()
          Increase number of commited transactions by 1.
 void addRollbackedTransaction()
          Increase number of rollbacked transactions by 1.
 void addSizeOfActivatedContent(long size)
          Adds size of content that is being activated.
 Collection<ActivationLogEntry> getActivationErrorLog()
          Gets collection of errors that occurred during activation.
 int getActivationErrors()
          Gets number of activation errors since last restart.
 Collection<ActivationLogEntry> getActivationLog()
          Gets activation log.
 int getActivations()
          Gets number of activations since last restart.
 Collection<ActivationLogEntry> getActivationsMadeByUser(String user)
          Gets activations made by a specified user.
 Map<String,Integer> getActivationsPerWorkspace()
          Gets activations per workspace since last restart.
 long getActivationTime()
          Gets time that was spent on activations.
 int getCommitedTransactions()
          Gets number of commited transactions since last restart.
 int getDeactivations()
          Gets number of deactivations since last restart.
 Date getLastRestartDate()
          Gets date from last restart.
 int getRollbackedTransactions()
          Gets number of rollbacked transactions since last restart.
 long getSizeOfActivatedContent()
          Gets size of activated content since last restart (in kilobytes).
 Map<String,ResponseTimeEntry> getSubscriberResponseTimes()
          Gets response times for subscribers.
 void logActivation(String path, String user, String workspaceName, String subscriber, boolean deactivation, boolean success)
          Logs activation request.
 void logError(String path, String user, String workspaceName, String subscriber, Throwable t, boolean deactivation)
          Logs error that occurred during activation.
 void setSubscriberResponseTime(String subscriber, long time)
          Logs subscriber response time.
 

Method Detail

setSubscriberResponseTime

void setSubscriberResponseTime(String subscriber,
                               long time)
Logs subscriber response time.

Parameters:
subscriber - name of subscriber
time - time in miliseconds

logError

void logError(String path,
              String user,
              String workspaceName,
              String subscriber,
              Throwable t,
              boolean deactivation)
Logs error that occurred during activation.

Parameters:
path - node path
user - user's name
workspaceName -
subscriber -
t - exception that occurred during activation
deactivation - true if deactivation, false if activation

addSizeOfActivatedContent

void addSizeOfActivatedContent(long size)
Adds size of content that is being activated.

Parameters:
size -

logActivation

void logActivation(String path,
                   String user,
                   String workspaceName,
                   String subscriber,
                   boolean deactivation,
                   boolean success)
Logs activation request.

Parameters:
node - node which is being activated
user - user that made activation request
deactivation - true if is deactivation, false if activation

addActivationTime

void addActivationTime(long time)
Adds time needed for activation to complete.

Parameters:
time - time in milliseconds

addCommitedTransaction

void addCommitedTransaction()
Increase number of commited transactions by 1.


addRollbackedTransaction

void addRollbackedTransaction()
Increase number of rollbacked transactions by 1.


getActivationTime

long getActivationTime()
Gets time that was spent on activations.

Returns:
time in milliseconds

getActivations

int getActivations()
Gets number of activations since last restart.

Returns:
number of activations

getDeactivations

int getDeactivations()
Gets number of deactivations since last restart.

Returns:
number of deactivations

getActivationErrors

int getActivationErrors()
Gets number of activation errors since last restart.

Returns:
number of activation errors

getCommitedTransactions

int getCommitedTransactions()
Gets number of commited transactions since last restart.

Returns:
number of commited transactions

getRollbackedTransactions

int getRollbackedTransactions()
Gets number of rollbacked transactions since last restart.

Returns:
number of rollbacked transactions

getSizeOfActivatedContent

long getSizeOfActivatedContent()
Gets size of activated content since last restart (in kilobytes).

Returns:
size of activated content (in kilobytes)

getLastRestartDate

Date getLastRestartDate()
Gets date from last restart.

Returns:
date

getActivationLog

Collection<ActivationLogEntry> getActivationLog()
Gets activation log.

Returns:
map containing activation log

getActivationErrorLog

Collection<ActivationLogEntry> getActivationErrorLog()
Gets collection of errors that occurred during activation.

Returns:
collection of errors

getActivationsMadeByUser

Collection<ActivationLogEntry> getActivationsMadeByUser(String user)
Gets activations made by a specified user.

Parameters:
user - name of user
Returns:
map with items that has been activated by specific user

getActivationsPerWorkspace

Map<String,Integer> getActivationsPerWorkspace()
Gets activations per workspace since last restart.

Returns:
activations per workspace

getSubscriberResponseTimes

Map<String,ResponseTimeEntry> getSubscriberResponseTimes()
Gets response times for subscribers.

Returns:
response times for subscribers


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.