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
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.admin.std.client;
028
029
030
031 import org.opends.server.admin.IllegalPropertyValueException;
032 import org.opends.server.admin.ManagedObjectDefinition;
033 import org.opends.server.admin.std.server.TraditionalWorkQueueCfg;
034
035
036
037 /**
038 * A client-side interface for reading and modifying Traditional Work
039 * Queue settings.
040 * <p>
041 * The Traditional Work Queue is a type of work queue that uses a
042 * number of worker threads that watch a queue and pick up an operation
043 * to process whenever one becomes available.
044 */
045 public interface TraditionalWorkQueueCfgClient extends WorkQueueCfgClient {
046
047 /**
048 * Get the configuration definition associated with this Traditional Work Queue.
049 *
050 * @return Returns the configuration definition associated with this Traditional Work Queue.
051 */
052 ManagedObjectDefinition<? extends TraditionalWorkQueueCfgClient, ? extends TraditionalWorkQueueCfg> definition();
053
054
055
056 /**
057 * Gets the "java-class" property.
058 * <p>
059 * Specifies the fully-qualified name of the Java class that
060 * provides the Traditional Work Queue implementation.
061 *
062 * @return Returns the value of the "java-class" property.
063 */
064 String getJavaClass();
065
066
067
068 /**
069 * Sets the "java-class" property.
070 * <p>
071 * Specifies the fully-qualified name of the Java class that
072 * provides the Traditional Work Queue implementation.
073 *
074 * @param value The value of the "java-class" property.
075 * @throws IllegalPropertyValueException
076 * If the new value is invalid.
077 */
078 void setJavaClass(String value) throws IllegalPropertyValueException;
079
080
081
082 /**
083 * Gets the "max-work-queue-capacity" property.
084 * <p>
085 * Specifies the maximum number of queued operations that can be in
086 * the work queue at any given time.
087 * <p>
088 * If the work queue is already full and additional requests are
089 * received by the server, the requests are rejected. A value of zero
090 * indicates that there is no limit to the size of the queue.
091 *
092 * @return Returns the value of the "max-work-queue-capacity" property.
093 */
094 Integer getMaxWorkQueueCapacity();
095
096
097
098 /**
099 * Sets the "max-work-queue-capacity" property.
100 * <p>
101 * Specifies the maximum number of queued operations that can be in
102 * the work queue at any given time.
103 * <p>
104 * If the work queue is already full and additional requests are
105 * received by the server, the requests are rejected. A value of zero
106 * indicates that there is no limit to the size of the queue.
107 *
108 * @param value The value of the "max-work-queue-capacity" property.
109 * @throws IllegalPropertyValueException
110 * If the new value is invalid.
111 */
112 void setMaxWorkQueueCapacity(Integer value) throws IllegalPropertyValueException;
113
114
115
116 /**
117 * Gets the "num-worker-threads" property.
118 * <p>
119 * Specifies the number of worker threads to be used for processing
120 * operations placed in the queue.
121 * <p>
122 * If the value is increased, the additional worker threads are
123 * created immediately. If the value is reduced, the appropriate
124 * number of threads are destroyed as operations complete processing.
125 *
126 * @return Returns the value of the "num-worker-threads" property.
127 */
128 Integer getNumWorkerThreads();
129
130
131
132 /**
133 * Sets the "num-worker-threads" property.
134 * <p>
135 * Specifies the number of worker threads to be used for processing
136 * operations placed in the queue.
137 * <p>
138 * If the value is increased, the additional worker threads are
139 * created immediately. If the value is reduced, the appropriate
140 * number of threads are destroyed as operations complete processing.
141 *
142 * @param value The value of the "num-worker-threads" property.
143 * @throws IllegalPropertyValueException
144 * If the new value is invalid.
145 */
146 void setNumWorkerThreads(int value) throws IllegalPropertyValueException;
147
148 }