001/* 002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * 019 * $Id$ 020 */ 021package org.nuxeo.ecm.core.management.events; 022 023/** 024 * Monitoring interface. 025 * 026 * @author Thierry Delprat 027 * @deprecated since 11.4: superseded by dropwizard metrics 028 */ 029@Deprecated(since = "11.4") 030public interface EventMonitoringMBean { 031 032 /** 033 * Gets the number of events in process or waiting for available slots. 034 */ 035 int getEventsInQueueCount(); 036 037 /** 038 * Gets number of active threads. 039 */ 040 int getActiveThreadsCount(); 041 042 /** 043 * Tells if time tracking is active for Async event handlers. 044 */ 045 boolean isAsyncHandlersTrackingEnabled(); 046 047 /** 048 * Enables or disables time tracking for Async event handlers. 049 */ 050 void setAsyncHandlersTrackingEnabled(boolean collectAsyncHandlersExecTime); 051 052 /** 053 * Tells if time tracking is active for Sync event handlers. 054 */ 055 boolean isSyncHandlersTrackingEnabled(); 056 057 /** 058 * Enables or disables time tracking for Sync event handlers. 059 */ 060 void setSyncHandlersTrackingEnabled(boolean collectSyncHandlersExecTime); 061 062 /** 063 * Returns the statistics for Async Handlers. 064 */ 065 String getAsyncHandlersExecTime(); 066 067 /** 068 * Returns the statistics for Sync Handlers. 069 */ 070 String getSyncHandlersExecTime(); 071 072 /** 073 * Resets the statistics. 074 */ 075 void resetHandlersExecTime(); 076 077 /** 078 * Tells if async handlers execution is blocked. 079 */ 080 boolean isBlockAsyncHandlers(); 081 082 /** 083 * Blocks or enables async handlers execution. 084 */ 085 void setBlockAsyncHandlers(boolean blockAsyncHandlers); 086 087 /** 088 * Tells if post-commit sync handlers execution is blocked. 089 */ 090 boolean isBlockSyncPostCommitHandlers(); 091 092 /** 093 * Blocks or enables post-commit sync handlers execution. 094 */ 095 void setBlockSyncPostCommitHandlers(boolean blockSyncPostCommitHandlers); 096 097 /** 098 * Get a summary of all registered listeners (name - type - enabled). 099 */ 100 String getListenersConfig(); 101 102 /** 103 * Enables or disables a listener by its name. 104 */ 105 void setListenerEnabledFlag(String listenerName, boolean enabled); 106 107 /** 108 * Getter for bulkMode processing. Bulk mode may be used by listeners to drop some processing. 109 */ 110 boolean isBulkModeEnabled(); 111 112 /** 113 * Enables/Disables bulkMode processing. 114 */ 115 void setBulkModeEnabled(boolean bulkModeEnabled); 116 117}