Skip to content

Commit 90aa794

Browse files
committed
gpclient: Javadoc update
1 parent d7bf08b commit 90aa794

10 files changed

Lines changed: 42 additions & 12 deletions

File tree

gpclient/gpclient-core/src/main/java/org/epics/gpclient/PV.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
/**
88
* A PV that can be both read and written. In general, the read payload will be
9-
* different from the write payload.
9+
* different from the write payload. See {@link PVReader} and {@link PVWriter} for
10+
* more information.
1011
*
1112
* @param <R> type of the read payload
1213
* @param <W> type of the write payload

gpclient/gpclient-core/src/main/java/org/epics/gpclient/PVReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* can be accessed from any thread,
1616
* but there is no guarantee on the atomicity. The only way to work on a consistent
1717
* snapshot is to use a listener and to process the event on the thread
18-
* of the listener. If the event is forwarded on another thread, one loses
18+
* of the listener. If the event is forwarded to another thread, one loses
1919
* the atomicity and also the other safeguards (like rate throttling).
2020
* The callback does not lock the object, so other threads can still access
2121
* the object while listeners are executing.
@@ -30,7 +30,7 @@
3030
* state before the event processing started: since each element in the event
3131
* processing may be stateful, this becomes a non-trivial task. It would also not
3232
* cover a much simpler hole: the processing may be finished and the pause/stop
33-
* arrive during the use event callback. At that point, the framework has no control, so
33+
* arrive during the user event callback. At that point, the framework has no control, so
3434
* you would still have a small chance of part of the callback executed after
3535
* pausing/closing. The solution there would be to lock the pause/close until
3636
* after all callbacks are done. This, which was the original implementation, has

gpclient/gpclient-core/src/main/java/org/epics/gpclient/PVWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package org.epics.gpclient;
66

77
/**
8-
* A write of a channel expression created through the {@link GPClient}. The write payload is specified by the generic type,
8+
* A writer of a channel expression created through the {@link GPClient}. The write payload is specified by the generic type,
99
* and is changed by {@link #write(java.lang.Object)}. Changes in
1010
* values are notified through the {@link PVWriterListener}.
1111
* <p>

gpclient/gpclient-core/src/main/java/org/epics/gpclient/PVWriterConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
/**
1313
* An expression used to set the final parameters on how the pv expression
14-
* should be read.
14+
* should be written.
1515
*
1616
* @param <T> the type of the expression
1717
* @author carcassi

gpclient/gpclient-core/src/main/java/org/epics/gpclient/datasource/CompositeDataSourceConfiguration.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,18 @@ public final class CompositeDataSourceConfiguration {
2828
private String delimiter = "://";
2929
private String defaultDataSource;
3030

31+
/**
32+
* Creates a new configuration.
33+
*/
3134
public CompositeDataSourceConfiguration() {
3235
}
3336

37+
/**
38+
* Loads the configuration from the given input stream which must correspond
39+
* to an XML file.
40+
*
41+
* @param input the xml configuration
42+
*/
3443
public CompositeDataSourceConfiguration(InputStream input) {
3544
try {
3645
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

gpclient/gpclient-core/src/main/java/org/epics/gpclient/datasource/DataSource.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ protected String channelHandlerRegisterName(String channelName, ChannelHandler h
101101

102102
// Keeps track of the recipes that were opened with
103103
// this data source.
104-
private final Set<ReadSubscription> readSubscriptions = Collections.synchronizedSet(new HashSet<ReadSubscription>());
105-
private final Set<WriteSubscription> writeSubscriptions = Collections.synchronizedSet(new HashSet<WriteSubscription>());
104+
private final Set<ReadSubscription> readSubscriptions = Collections.synchronizedSet(new HashSet<>());
105+
private final Set<WriteSubscription> writeSubscriptions = Collections.synchronizedSet(new HashSet<>());
106106

107107
private final ProcessingQueue<ReadSubscription> startReadQueue = new ProcessingQueue<>(exec, new Consumer<List<ReadSubscription>>() {
108108
@Override
@@ -190,6 +190,11 @@ public void accept(List<WriteSubscription> list) {
190190
}
191191
});
192192

193+
/**
194+
* Starts the given write subscription.
195+
*
196+
* @param writeSubscription the subscription information
197+
*/
193198
public void startWrite(final WriteSubscription writeSubscription) {
194199
startWriteQueue.submit(writeSubscription);
195200
}
@@ -220,6 +225,11 @@ public void accept(List<WriteSubscription> list) {
220225
}
221226
});
222227

228+
/**
229+
* Stops the given write subscription.
230+
*
231+
* @param writeRecipe the subscription information
232+
*/
223233
public void stopWrite(final WriteSubscription writeRecipe) {
224234
stopWriteQueue.submit(writeRecipe);
225235
}

gpclient/gpclient-core/src/main/java/org/epics/gpclient/datasource/DataSourceProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import java.util.logging.Logger;
1111

1212
/**
13-
* A class that provides support for a DataSource.
13+
* A class that provides support for a {@link DataSource}.
1414
* <p>
1515
* This interface allows different modules to registers a DataSource through
1616
* the ServiceLoader. Implementations that are correctly registered will
@@ -42,7 +42,7 @@ public abstract class DataSourceProvider {
4242
public abstract DataSource createInstance();
4343

4444
/**
45-
* Looks up the registered factories and creates a CompositeDataSource
45+
* Looks up the registered factories and creates a {@link CompositeDataSource}
4646
* using them.
4747
*
4848
* @return a new DataSource

gpclient/gpclient-core/src/main/java/org/epics/gpclient/datasource/DataSourceTypeAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import org.epics.gpclient.ReadCollector;
88

99
/**
10-
* Matches and fills a cache with the data from connection and message payloads.
10+
* Matches and sends notifies {@link ReadCollector}s with the data from connection and message payloads.
1111
* This optional class helps the writer of a datasource to manage the
1212
* type matching and conversions.
1313
*
@@ -30,7 +30,7 @@ public interface DataSourceTypeAdapter<ConnectionPayload, MessagePayload> {
3030

3131
/**
3232
* The parameters required to open a monitor for the channel. The
33-
* type of the parameters will be datasource specific
33+
* type of the parameters will be datasource specific.
3434
* <p>
3535
* For channels multiplexed on a single subscription, this method
3636
* is never used.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* Copyright information and license terms for this software can be
3+
* found in the file LICENSE.TXT included with the distribution.
4+
*/
5+
6+
/**
7+
* Defines the API to connect data sources to the EPICS General Purpose client (gpclient).
8+
*
9+
*/
10+
package org.epics.gpclient.datasource;

gpclient/gpclient-core/src/main/java/org/epics/gpclient/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* found in the file LICENSE.TXT included with the distribution.
44
*/
55
/**
6-
* Main package of the EPICS General Purpose client (gpclient).
6+
* Defines the core EPICS Generic Purpose client (gpclient) API.
77
* <p>
88
* The generic purpose client is meant to be used to build applications that
99
* are not specific to a particular deployment environment or to a particular use

0 commit comments

Comments
 (0)