001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.forgerock.opendj.server.config.meta;
027
028
029
030import java.util.Collection;
031import java.util.SortedSet;
032import org.forgerock.opendj.config.AdministratorAction;
033import org.forgerock.opendj.config.BooleanPropertyDefinition;
034import org.forgerock.opendj.config.ClassPropertyDefinition;
035import org.forgerock.opendj.config.client.ConcurrentModificationException;
036import org.forgerock.opendj.config.client.ManagedObject;
037import org.forgerock.opendj.config.client.MissingMandatoryPropertiesException;
038import org.forgerock.opendj.config.client.OperationRejectedException;
039import org.forgerock.opendj.config.DefaultBehaviorProvider;
040import org.forgerock.opendj.config.DefinedDefaultBehaviorProvider;
041import org.forgerock.opendj.config.DurationPropertyDefinition;
042import org.forgerock.opendj.config.EnumPropertyDefinition;
043import org.forgerock.opendj.config.ManagedObjectAlreadyExistsException;
044import org.forgerock.opendj.config.ManagedObjectDefinition;
045import org.forgerock.opendj.config.PropertyOption;
046import org.forgerock.opendj.config.PropertyProvider;
047import org.forgerock.opendj.config.server.ConfigurationChangeListener;
048import org.forgerock.opendj.config.server.ServerManagedObject;
049import org.forgerock.opendj.config.StringPropertyDefinition;
050import org.forgerock.opendj.config.Tag;
051import org.forgerock.opendj.config.UndefinedDefaultBehaviorProvider;
052import org.forgerock.opendj.ldap.DN;
053import org.forgerock.opendj.ldap.LdapException;
054import org.forgerock.opendj.server.config.client.ProfilerPluginCfgClient;
055import org.forgerock.opendj.server.config.meta.PluginCfgDefn.PluginType;
056import org.forgerock.opendj.server.config.server.PluginCfg;
057import org.forgerock.opendj.server.config.server.ProfilerPluginCfg;
058
059
060
061/**
062 * An interface for querying the Profiler Plugin managed object
063 * definition meta information.
064 * <p>
065 * The Profiler plug-in captures profiling information about
066 * operations performed inside the JVM while the OpenDJ directory
067 * server is running.
068 */
069public final class ProfilerPluginCfgDefn extends ManagedObjectDefinition<ProfilerPluginCfgClient, ProfilerPluginCfg> {
070
071  // The singleton configuration definition instance.
072  private static final ProfilerPluginCfgDefn INSTANCE = new ProfilerPluginCfgDefn();
073
074
075
076  /**
077   * Defines the set of permissable values for the "profile-action" property.
078   * <p>
079   * Specifies the action that should be taken by the profiler.
080   * <p>
081   * A value of "start" causes the profiler thread to start collecting
082   * data if it is not already active. A value of "stop" causes the
083   * profiler thread to stop collecting data and write it to disk, and
084   * a value of "cancel" causes the profiler thread to stop collecting
085   * data and discard anything that has been captured. These operations
086   * occur immediately.
087   */
088  public static enum ProfileAction {
089
090    /**
091     * Stop collecting profile data and discard what has been
092     * captured.
093     */
094    CANCEL("cancel"),
095
096
097
098    /**
099     * Do not take any action.
100     */
101    NONE("none"),
102
103
104
105    /**
106     * Start collecting profile data.
107     */
108    START("start"),
109
110
111
112    /**
113     * Stop collecting profile data and write what has been captured
114     * to a file in the profile directory.
115     */
116    STOP("stop");
117
118
119
120    // String representation of the value.
121    private final String name;
122
123
124
125    // Private constructor.
126    private ProfileAction(String name) { this.name = name; }
127
128
129
130    /**
131     * {@inheritDoc}
132     */
133    public String toString() { return name; }
134
135  }
136
137
138
139  // The "enable-profiling-on-startup" property definition.
140  private static final BooleanPropertyDefinition PD_ENABLE_PROFILING_ON_STARTUP;
141
142
143
144  // The "invoke-for-internal-operations" property definition.
145  private static final BooleanPropertyDefinition PD_INVOKE_FOR_INTERNAL_OPERATIONS;
146
147
148
149  // The "java-class" property definition.
150  private static final ClassPropertyDefinition PD_JAVA_CLASS;
151
152
153
154  // The "plugin-type" property definition.
155  private static final EnumPropertyDefinition<PluginType> PD_PLUGIN_TYPE;
156
157
158
159  // The "profile-action" property definition.
160  private static final EnumPropertyDefinition<ProfileAction> PD_PROFILE_ACTION;
161
162
163
164  // The "profile-directory" property definition.
165  private static final StringPropertyDefinition PD_PROFILE_DIRECTORY;
166
167
168
169  // The "profile-sample-interval" property definition.
170  private static final DurationPropertyDefinition PD_PROFILE_SAMPLE_INTERVAL;
171
172
173
174  // Build the "enable-profiling-on-startup" property definition.
175  static {
176      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "enable-profiling-on-startup");
177      builder.setOption(PropertyOption.MANDATORY);
178      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "enable-profiling-on-startup"));
179      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Boolean>());
180      PD_ENABLE_PROFILING_ON_STARTUP = builder.getInstance();
181      INSTANCE.registerPropertyDefinition(PD_ENABLE_PROFILING_ON_STARTUP);
182  }
183
184
185
186  // Build the "invoke-for-internal-operations" property definition.
187  static {
188      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "invoke-for-internal-operations");
189      builder.setOption(PropertyOption.ADVANCED);
190      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "invoke-for-internal-operations"));
191      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
192      builder.setDefaultBehaviorProvider(provider);
193      PD_INVOKE_FOR_INTERNAL_OPERATIONS = builder.getInstance();
194      INSTANCE.registerPropertyDefinition(PD_INVOKE_FOR_INTERNAL_OPERATIONS);
195  }
196
197
198
199  // Build the "java-class" property definition.
200  static {
201      ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class");
202      builder.setOption(PropertyOption.MANDATORY);
203      builder.setOption(PropertyOption.ADVANCED);
204      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "java-class"));
205      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.plugins.profiler.ProfilerPlugin");
206      builder.setDefaultBehaviorProvider(provider);
207      builder.addInstanceOf("org.opends.server.api.plugin.DirectoryServerPlugin");
208      PD_JAVA_CLASS = builder.getInstance();
209      INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS);
210  }
211
212
213
214  // Build the "plugin-type" property definition.
215  static {
216      EnumPropertyDefinition.Builder<PluginType> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "plugin-type");
217      builder.setOption(PropertyOption.MULTI_VALUED);
218      builder.setOption(PropertyOption.MANDATORY);
219      builder.setOption(PropertyOption.ADVANCED);
220      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "plugin-type"));
221      DefaultBehaviorProvider<PluginType> provider = new DefinedDefaultBehaviorProvider<PluginType>("startup");
222      builder.setDefaultBehaviorProvider(provider);
223      builder.setEnumClass(PluginType.class);
224      PD_PLUGIN_TYPE = builder.getInstance();
225      INSTANCE.registerPropertyDefinition(PD_PLUGIN_TYPE);
226  }
227
228
229
230  // Build the "profile-action" property definition.
231  static {
232      EnumPropertyDefinition.Builder<ProfileAction> builder = EnumPropertyDefinition.createBuilder(INSTANCE, "profile-action");
233      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "profile-action"));
234      DefaultBehaviorProvider<ProfileAction> provider = new DefinedDefaultBehaviorProvider<ProfileAction>("none");
235      builder.setDefaultBehaviorProvider(provider);
236      builder.setEnumClass(ProfileAction.class);
237      PD_PROFILE_ACTION = builder.getInstance();
238      INSTANCE.registerPropertyDefinition(PD_PROFILE_ACTION);
239  }
240
241
242
243  // Build the "profile-directory" property definition.
244  static {
245      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "profile-directory");
246      builder.setOption(PropertyOption.MANDATORY);
247      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "profile-directory"));
248      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
249      builder.setPattern(".*", "DIR");
250      PD_PROFILE_DIRECTORY = builder.getInstance();
251      INSTANCE.registerPropertyDefinition(PD_PROFILE_DIRECTORY);
252  }
253
254
255
256  // Build the "profile-sample-interval" property definition.
257  static {
258      DurationPropertyDefinition.Builder builder = DurationPropertyDefinition.createBuilder(INSTANCE, "profile-sample-interval");
259      builder.setOption(PropertyOption.MANDATORY);
260      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "profile-sample-interval"));
261      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Long>());
262      builder.setBaseUnit("ms");
263      builder.setUpperLimit("2147483647");
264      builder.setLowerLimit("1");
265      PD_PROFILE_SAMPLE_INTERVAL = builder.getInstance();
266      INSTANCE.registerPropertyDefinition(PD_PROFILE_SAMPLE_INTERVAL);
267  }
268
269
270
271  // Register the tags associated with this managed object definition.
272  static {
273    INSTANCE.registerTag(Tag.valueOf("core-server"));
274  }
275
276
277
278  /**
279   * Get the Profiler Plugin configuration definition singleton.
280   *
281   * @return Returns the Profiler Plugin configuration definition
282   *         singleton.
283   */
284  public static ProfilerPluginCfgDefn getInstance() {
285    return INSTANCE;
286  }
287
288
289
290  /**
291   * Private constructor.
292   */
293  private ProfilerPluginCfgDefn() {
294    super("profiler-plugin", PluginCfgDefn.getInstance());
295  }
296
297
298
299  /**
300   * {@inheritDoc}
301   */
302  public ProfilerPluginCfgClient createClientConfiguration(
303      ManagedObject<? extends ProfilerPluginCfgClient> impl) {
304    return new ProfilerPluginCfgClientImpl(impl);
305  }
306
307
308
309  /**
310   * {@inheritDoc}
311   */
312  public ProfilerPluginCfg createServerConfiguration(
313      ServerManagedObject<? extends ProfilerPluginCfg> impl) {
314    return new ProfilerPluginCfgServerImpl(impl);
315  }
316
317
318
319  /**
320   * {@inheritDoc}
321   */
322  public Class<ProfilerPluginCfg> getServerConfigurationClass() {
323    return ProfilerPluginCfg.class;
324  }
325
326
327
328  /**
329   * Get the "enabled" property definition.
330   * <p>
331   * Indicates whether the plug-in is enabled for use.
332   *
333   * @return Returns the "enabled" property definition.
334   */
335  public BooleanPropertyDefinition getEnabledPropertyDefinition() {
336    return PluginCfgDefn.getInstance().getEnabledPropertyDefinition();
337  }
338
339
340
341  /**
342   * Get the "enable-profiling-on-startup" property definition.
343   * <p>
344   * Indicates whether the profiler plug-in is to start collecting
345   * data automatically when the directory server is started.
346   * <p>
347   * This property is read only when the server is started, and any
348   * changes take effect on the next restart. This property is
349   * typically set to "false" unless startup profiling is required,
350   * because otherwise the volume of data that can be collected can
351   * cause the server to run out of memory if it is not turned off in a
352   * timely manner.
353   *
354   * @return Returns the "enable-profiling-on-startup" property definition.
355   */
356  public BooleanPropertyDefinition getEnableProfilingOnStartupPropertyDefinition() {
357    return PD_ENABLE_PROFILING_ON_STARTUP;
358  }
359
360
361
362  /**
363   * Get the "invoke-for-internal-operations" property definition.
364   * <p>
365   * Indicates whether the plug-in should be invoked for internal
366   * operations.
367   * <p>
368   * Any plug-in that can be invoked for internal operations must
369   * ensure that it does not create any new internal operatons that can
370   * cause the same plug-in to be re-invoked.
371   *
372   * @return Returns the "invoke-for-internal-operations" property definition.
373   */
374  public BooleanPropertyDefinition getInvokeForInternalOperationsPropertyDefinition() {
375    return PD_INVOKE_FOR_INTERNAL_OPERATIONS;
376  }
377
378
379
380  /**
381   * Get the "java-class" property definition.
382   * <p>
383   * Specifies the fully-qualified name of the Java class that
384   * provides the plug-in implementation.
385   *
386   * @return Returns the "java-class" property definition.
387   */
388  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
389    return PD_JAVA_CLASS;
390  }
391
392
393
394  /**
395   * Get the "plugin-type" property definition.
396   * <p>
397   * Specifies the set of plug-in types for the plug-in, which
398   * specifies the times at which the plug-in is invoked.
399   *
400   * @return Returns the "plugin-type" property definition.
401   */
402  public EnumPropertyDefinition<PluginType> getPluginTypePropertyDefinition() {
403    return PD_PLUGIN_TYPE;
404  }
405
406
407
408  /**
409   * Get the "profile-action" property definition.
410   * <p>
411   * Specifies the action that should be taken by the profiler.
412   * <p>
413   * A value of "start" causes the profiler thread to start collecting
414   * data if it is not already active. A value of "stop" causes the
415   * profiler thread to stop collecting data and write it to disk, and
416   * a value of "cancel" causes the profiler thread to stop collecting
417   * data and discard anything that has been captured. These operations
418   * occur immediately.
419   *
420   * @return Returns the "profile-action" property definition.
421   */
422  public EnumPropertyDefinition<ProfileAction> getProfileActionPropertyDefinition() {
423    return PD_PROFILE_ACTION;
424  }
425
426
427
428  /**
429   * Get the "profile-directory" property definition.
430   * <p>
431   * Specifies the path to the directory where profile information is
432   * to be written. This path may be either an absolute path or a path
433   * that is relative to the root of the OpenDJ directory server
434   * instance.
435   * <p>
436   * The directory must exist and the directory server must have
437   * permission to create new files in it.
438   *
439   * @return Returns the "profile-directory" property definition.
440   */
441  public StringPropertyDefinition getProfileDirectoryPropertyDefinition() {
442    return PD_PROFILE_DIRECTORY;
443  }
444
445
446
447  /**
448   * Get the "profile-sample-interval" property definition.
449   * <p>
450   * Specifies the sample interval in milliseconds to be used when
451   * capturing profiling information in the server.
452   * <p>
453   * When capturing data, the profiler thread sleeps for this length
454   * of time between calls to obtain traces for all threads running in
455   * the JVM.
456   *
457   * @return Returns the "profile-sample-interval" property definition.
458   */
459  public DurationPropertyDefinition getProfileSampleIntervalPropertyDefinition() {
460    return PD_PROFILE_SAMPLE_INTERVAL;
461  }
462
463
464
465  /**
466   * Managed object client implementation.
467   */
468  private static class ProfilerPluginCfgClientImpl implements
469    ProfilerPluginCfgClient {
470
471    // Private implementation.
472    private ManagedObject<? extends ProfilerPluginCfgClient> impl;
473
474
475
476    // Private constructor.
477    private ProfilerPluginCfgClientImpl(
478        ManagedObject<? extends ProfilerPluginCfgClient> impl) {
479      this.impl = impl;
480    }
481
482
483
484    /**
485     * {@inheritDoc}
486     */
487    public Boolean isEnabled() {
488      return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
489    }
490
491
492
493    /**
494     * {@inheritDoc}
495     */
496    public void setEnabled(boolean value) {
497      impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value);
498    }
499
500
501
502    /**
503     * {@inheritDoc}
504     */
505    public Boolean isEnableProfilingOnStartup() {
506      return impl.getPropertyValue(INSTANCE.getEnableProfilingOnStartupPropertyDefinition());
507    }
508
509
510
511    /**
512     * {@inheritDoc}
513     */
514    public void setEnableProfilingOnStartup(boolean value) {
515      impl.setPropertyValue(INSTANCE.getEnableProfilingOnStartupPropertyDefinition(), value);
516    }
517
518
519
520    /**
521     * {@inheritDoc}
522     */
523    public boolean isInvokeForInternalOperations() {
524      return impl.getPropertyValue(INSTANCE.getInvokeForInternalOperationsPropertyDefinition());
525    }
526
527
528
529    /**
530     * {@inheritDoc}
531     */
532    public void setInvokeForInternalOperations(Boolean value) {
533      impl.setPropertyValue(INSTANCE.getInvokeForInternalOperationsPropertyDefinition(), value);
534    }
535
536
537
538    /**
539     * {@inheritDoc}
540     */
541    public String getJavaClass() {
542      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
543    }
544
545
546
547    /**
548     * {@inheritDoc}
549     */
550    public void setJavaClass(String value) {
551      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
552    }
553
554
555
556    /**
557     * {@inheritDoc}
558     */
559    public SortedSet<PluginType> getPluginType() {
560      return impl.getPropertyValues(INSTANCE.getPluginTypePropertyDefinition());
561    }
562
563
564
565    /**
566     * {@inheritDoc}
567     */
568    public void setPluginType(Collection<PluginType> values) {
569      impl.setPropertyValues(INSTANCE.getPluginTypePropertyDefinition(), values);
570    }
571
572
573
574    /**
575     * {@inheritDoc}
576     */
577    public ProfileAction getProfileAction() {
578      return impl.getPropertyValue(INSTANCE.getProfileActionPropertyDefinition());
579    }
580
581
582
583    /**
584     * {@inheritDoc}
585     */
586    public void setProfileAction(ProfileAction value) {
587      impl.setPropertyValue(INSTANCE.getProfileActionPropertyDefinition(), value);
588    }
589
590
591
592    /**
593     * {@inheritDoc}
594     */
595    public String getProfileDirectory() {
596      return impl.getPropertyValue(INSTANCE.getProfileDirectoryPropertyDefinition());
597    }
598
599
600
601    /**
602     * {@inheritDoc}
603     */
604    public void setProfileDirectory(String value) {
605      impl.setPropertyValue(INSTANCE.getProfileDirectoryPropertyDefinition(), value);
606    }
607
608
609
610    /**
611     * {@inheritDoc}
612     */
613    public Long getProfileSampleInterval() {
614      return impl.getPropertyValue(INSTANCE.getProfileSampleIntervalPropertyDefinition());
615    }
616
617
618
619    /**
620     * {@inheritDoc}
621     */
622    public void setProfileSampleInterval(long value) {
623      impl.setPropertyValue(INSTANCE.getProfileSampleIntervalPropertyDefinition(), value);
624    }
625
626
627
628    /**
629     * {@inheritDoc}
630     */
631    public ManagedObjectDefinition<? extends ProfilerPluginCfgClient, ? extends ProfilerPluginCfg> definition() {
632      return INSTANCE;
633    }
634
635
636
637    /**
638     * {@inheritDoc}
639     */
640    public PropertyProvider properties() {
641      return impl;
642    }
643
644
645
646    /**
647     * {@inheritDoc}
648     */
649    public void commit() throws ManagedObjectAlreadyExistsException,
650        MissingMandatoryPropertiesException, ConcurrentModificationException,
651        OperationRejectedException, LdapException {
652      impl.commit();
653    }
654
655  }
656
657
658
659  /**
660   * Managed object server implementation.
661   */
662  private static class ProfilerPluginCfgServerImpl implements
663    ProfilerPluginCfg {
664
665    // Private implementation.
666    private ServerManagedObject<? extends ProfilerPluginCfg> impl;
667
668    // The value of the "enabled" property.
669    private final boolean pEnabled;
670
671    // The value of the "enable-profiling-on-startup" property.
672    private final boolean pEnableProfilingOnStartup;
673
674    // The value of the "invoke-for-internal-operations" property.
675    private final boolean pInvokeForInternalOperations;
676
677    // The value of the "java-class" property.
678    private final String pJavaClass;
679
680    // The value of the "plugin-type" property.
681    private final SortedSet<PluginType> pPluginType;
682
683    // The value of the "profile-action" property.
684    private final ProfileAction pProfileAction;
685
686    // The value of the "profile-directory" property.
687    private final String pProfileDirectory;
688
689    // The value of the "profile-sample-interval" property.
690    private final long pProfileSampleInterval;
691
692
693
694    // Private constructor.
695    private ProfilerPluginCfgServerImpl(ServerManagedObject<? extends ProfilerPluginCfg> impl) {
696      this.impl = impl;
697      this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
698      this.pEnableProfilingOnStartup = impl.getPropertyValue(INSTANCE.getEnableProfilingOnStartupPropertyDefinition());
699      this.pInvokeForInternalOperations = impl.getPropertyValue(INSTANCE.getInvokeForInternalOperationsPropertyDefinition());
700      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
701      this.pPluginType = impl.getPropertyValues(INSTANCE.getPluginTypePropertyDefinition());
702      this.pProfileAction = impl.getPropertyValue(INSTANCE.getProfileActionPropertyDefinition());
703      this.pProfileDirectory = impl.getPropertyValue(INSTANCE.getProfileDirectoryPropertyDefinition());
704      this.pProfileSampleInterval = impl.getPropertyValue(INSTANCE.getProfileSampleIntervalPropertyDefinition());
705    }
706
707
708
709    /**
710     * {@inheritDoc}
711     */
712    public void addProfilerChangeListener(
713        ConfigurationChangeListener<ProfilerPluginCfg> listener) {
714      impl.registerChangeListener(listener);
715    }
716
717
718
719    /**
720     * {@inheritDoc}
721     */
722    public void removeProfilerChangeListener(
723        ConfigurationChangeListener<ProfilerPluginCfg> listener) {
724      impl.deregisterChangeListener(listener);
725    }
726    /**
727     * {@inheritDoc}
728     */
729    public void addChangeListener(
730        ConfigurationChangeListener<PluginCfg> listener) {
731      impl.registerChangeListener(listener);
732    }
733
734
735
736    /**
737     * {@inheritDoc}
738     */
739    public void removeChangeListener(
740        ConfigurationChangeListener<PluginCfg> listener) {
741      impl.deregisterChangeListener(listener);
742    }
743
744
745
746    /**
747     * {@inheritDoc}
748     */
749    public boolean isEnabled() {
750      return pEnabled;
751    }
752
753
754
755    /**
756     * {@inheritDoc}
757     */
758    public boolean isEnableProfilingOnStartup() {
759      return pEnableProfilingOnStartup;
760    }
761
762
763
764    /**
765     * {@inheritDoc}
766     */
767    public boolean isInvokeForInternalOperations() {
768      return pInvokeForInternalOperations;
769    }
770
771
772
773    /**
774     * {@inheritDoc}
775     */
776    public String getJavaClass() {
777      return pJavaClass;
778    }
779
780
781
782    /**
783     * {@inheritDoc}
784     */
785    public SortedSet<PluginType> getPluginType() {
786      return pPluginType;
787    }
788
789
790
791    /**
792     * {@inheritDoc}
793     */
794    public ProfileAction getProfileAction() {
795      return pProfileAction;
796    }
797
798
799
800    /**
801     * {@inheritDoc}
802     */
803    public String getProfileDirectory() {
804      return pProfileDirectory;
805    }
806
807
808
809    /**
810     * {@inheritDoc}
811     */
812    public long getProfileSampleInterval() {
813      return pProfileSampleInterval;
814    }
815
816
817
818    /**
819     * {@inheritDoc}
820     */
821    public Class<? extends ProfilerPluginCfg> configurationClass() {
822      return ProfilerPluginCfg.class;
823    }
824
825
826
827    /**
828     * {@inheritDoc}
829     */
830    public DN dn() {
831      return impl.getDN();
832    }
833
834  }
835}