KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > excalibur > instrument > client > InstrumentManagerData


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14  * implied.
15  *
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */

19
20 package org.apache.excalibur.instrument.client;
21
22 public interface InstrumentManagerData
23     extends Data
24 {
25     /**
26      * Returns the name.
27      *
28      * @return The name.
29      */

30     String JavaDoc getName();
31     
32     /**
33      * Gets a thread-safe snapshot of the instrumentable list.
34      *
35      * @return A thread-safe snapshot of the instrumentable list.
36      */

37     InstrumentableData[] getInstrumentables();
38     
39     /**
40      * Causes the the entire instrument tree to be updated in one call. Very fast
41      * when it is known that all or most data has changed.
42      *
43      * @return true if successful.
44      */

45     boolean updateAll();
46     
47     /**
48      * Requests that a sample be created or that its lease be updated.
49      *
50      * @param instrumentName The full name of the instrument whose sample is
51      * to be created or updated.
52      * @param description Description to assign to the new sample.
53      * @param interval Sample interval of the new sample.
54      * @param sampleCount Number of samples in the new sample.
55      * @param leaseTime Requested lease time. The server may not grant the
56      * full lease.
57      * @param sampleType The type of sample to be created.
58      */

59     void createInstrumentSample( String JavaDoc instrumentName,
60                                  String JavaDoc description,
61                                  long interval,
62                                  int sampleCount,
63                                  long leaseTime,
64                                  int sampleType );
65     
66     /**
67      * Requests that a set of samples be created or that their leases be
68      * updated. All array parameters must be of the same length.
69      *
70      * @param instrumentNames The full names of the instruments whose sample
71      * are to be created or updated.
72      * @param descriptions Descriptions to assign to the new samples.
73      * @param intervals Sample intervals of the new samples.
74      * @param sampleCounts Number of samples in each the new samples.
75      * @param leaseTimes Requested lease times. The server may not grant the
76      * full leases.
77      * @param sampleTypes The types of samples to be created.
78      */

79     void createInstrumentSamples( String JavaDoc[] instrumentNames,
80                                   String JavaDoc[] descriptions,
81                                   long[] intervals,
82                                   int[] sampleCounts,
83                                   long[] leaseTimes,
84                                   int[] sampleTypes );
85 }
86
Popular Tags