Skip to content

Commit

Permalink
Quiet javadocs. (#769)
Browse files Browse the repository at this point in the history
* Quiet javadocs.

* Lint fixes.

* Fix ci-push-javadoc script.

* Revert to old style javadocs.
  • Loading branch information
johnou committed Aug 7, 2018
1 parent df6f915 commit 990bfe7
Show file tree
Hide file tree
Showing 14 changed files with 176 additions and 172 deletions.
1 change: 1 addition & 0 deletions agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifest>
Expand Down
16 changes: 8 additions & 8 deletions bin/ci-push-javadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
PROJECT=atomix

if [ "$TRAVIS_REPO_SLUG" == "atomix/$PROJECT" ] && \
[ "$TRAVIS_JDK_VERSION" == "openjdk10" ] && \
[ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && \
[ "$TRAVIS_PULL_REQUEST" == "false" ] && \
[ "$TRAVIS_BRANCH" == "master" ]; then
echo -e "Publishing Javadoc...\n"

mvn javadoc:javadoc -Djv=latest --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
mvn javadoc:aggregate -Djv=latest --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
TARGET="$(pwd)/target"

cd $HOME
git clone --quiet https://${GH_TOKEN}@github.com/atomix/atomix.github.io gh-pages > /dev/null

cd gh-pages
git config --global user.email "travis@travis-ci.org"
git config --global user.name "travis-ci"
git rm -rf $PROJECT/api/latest
mkdir -p $PROJECT/api/latest
mv -v $TARGET/site/apidocs/* $PROJECT/api/latest
git add -A -f $PROJECT/api/latest
git config user.email "travis@travis-ci.org"
git config user.name "travis-ci"
git rm -rf docs/latest/api
mkdir -p docs/latest/api
mv -v $TARGET/site/apidocs/* docs/latest/api
git add -A -f docs/latest/api
git commit -m "Travis generated Javadoc for $PROJECT build $TRAVIS_BUILD_NUMBER"
git push -fq origin > /dev/null

Expand Down
2 changes: 1 addition & 1 deletion bin/push-javadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
echo "Enter the API version to generate docs for: "
read apiVersion

mvn javadoc:javadoc -Djv=$apiVersion
mvn javadoc:aggregate -Djv=$apiVersion
rm -rf target/docs
git clone git@github.com:atomix/atomix.github.io.git target/docs > /dev/null
cd target/docs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,30 +28,30 @@ public interface DistributedCollectionService<E> extends IterableService<E> {

/**
* Returns the number of elements in this collection. If this collection
* contains more than <tt>Integer.MAX_VALUE</tt> elements, returns
* <tt>Integer.MAX_VALUE</tt>.
* contains more than <code>Integer.MAX_VALUE</code> elements, returns
* <code>Integer.MAX_VALUE</code>.
*
* @return the number of elements in this collection
*/
@Query
int size();

/**
* Returns <tt>true</tt> if this collection contains no elements.
* Returns <code>true</code> if this collection contains no elements.
*
* @return <tt>true</tt> if this collection contains no elements
* @return <code>true</code> if this collection contains no elements
*/
@Query
boolean isEmpty();

/**
* Returns <tt>true</tt> if this collection contains the specified element.
* More formally, returns <tt>true</tt> if and only if this collection
* contains at least one element <tt>e</tt> such that
* <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>.
* Returns <code>true</code> if this collection contains the specified element.
* More formally, returns <code>true</code> if and only if this collection
* contains at least one element <code>e</code> such that
* <code>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</code>.
*
* @param o element whose presence in this collection is to be tested
* @return <tt>true</tt> if this collection contains the specified
* @return <code>true</code> if this collection contains the specified
* element
* @throws ClassCastException if the type of the specified element
* is incompatible with this collection
Expand All @@ -65,27 +65,27 @@ public interface DistributedCollectionService<E> extends IterableService<E> {

/**
* Ensures that this collection contains the specified element (optional
* operation). Returns <tt>true</tt> if this collection changed as a
* result of the call. (Returns <tt>false</tt> if this collection does
* operation). Returns <code>true</code> if this collection changed as a
* result of the call. (Returns <code>false</code> if this collection does
* not permit duplicates and already contains the specified element.)<p>
*
* Collections that support this operation may place limitations on what
* elements may be added to this collection. In particular, some
* collections will refuse to add <tt>null</tt> elements, and others will
* collections will refuse to add <code>null</code> elements, and others will
* impose restrictions on the type of elements that may be added.
* Collection classes should clearly specify in their documentation any
* restrictions on what elements may be added.<p>
*
* If a collection refuses to add a particular element for any reason
* other than that it already contains the element, it <i>must</i> throw
* an exception (rather than returning <tt>false</tt>). This preserves
* an exception (rather than returning <code>false</code>). This preserves
* the invariant that a collection always contains the specified element
* after this call returns.
*
* @param element element whose presence in this collection is to be ensured
* @return <tt>true</tt> if this collection changed as a result of the
* @return <code>true</code> if this collection changed as a result of the
* call
* @throws UnsupportedOperationException if the <tt>add</tt> operation
* @throws UnsupportedOperationException if the <code>add</code> operation
* is not supported by this collection
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this collection
Expand All @@ -102,32 +102,32 @@ public interface DistributedCollectionService<E> extends IterableService<E> {
/**
* Removes a single instance of the specified element from this
* collection, if it is present (optional operation). More formally,
* removes an element <tt>e</tt> such that
* <tt>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</tt>, if
* removes an element <code>e</code> such that
* <code>(o==null&nbsp;?&nbsp;e==null&nbsp;:&nbsp;o.equals(e))</code>, if
* this collection contains one or more such elements. Returns
* <tt>true</tt> if this collection contained the specified element (or
* <code>true</code> if this collection contained the specified element (or
* equivalently, if this collection changed as a result of the call).
*
* @param o element to be removed from this collection, if present
* @return <tt>true</tt> if an element was removed as a result of this call
* @return <code>true</code> if an element was removed as a result of this call
* @throws ClassCastException if the type of the specified element
* is incompatible with this collection
* (<a href="#optional-restrictions">optional</a>)
* @throws NullPointerException if the specified element is null and this
* collection does not permit null elements
* (<a href="#optional-restrictions">optional</a>)
* @throws UnsupportedOperationException if the <tt>remove</tt> operation
* @throws UnsupportedOperationException if the <code>remove</code> operation
* is not supported by this collection
*/
@Command("removeValue")
CollectionUpdateResult<Boolean> remove(E o);

/**
* Returns <tt>true</tt> if this collection contains all of the elements
* Returns <code>true</code> if this collection contains all of the elements
* in the specified collection.
*
* @param c collection to be checked for containment in this collection
* @return <tt>true</tt> if this collection contains all of the elements
* @return <code>true</code> if this collection contains all of the elements
* in the specified collection
* @throws ClassCastException if the types of one or more elements
* in the specified collection are incompatible with this
Expand All @@ -152,8 +152,8 @@ public interface DistributedCollectionService<E> extends IterableService<E> {
* nonempty.)
*
* @param c collection containing elements to be added to this collection
* @return <tt>true</tt> if this collection changed as a result of the call
* @throws UnsupportedOperationException if the <tt>addAll</tt> operation
* @return <code>true</code> if this collection changed as a result of the call
* @throws UnsupportedOperationException if the <code>addAll</code> operation
* is not supported by this collection
* @throws ClassCastException if the class of an element of the specified
* collection prevents it from being added to this collection
Expand All @@ -177,8 +177,8 @@ public interface DistributedCollectionService<E> extends IterableService<E> {
* specified collection.
*
* @param c collection containing elements to be retained in this collection
* @return <tt>true</tt> if this collection changed as a result of the call
* @throws UnsupportedOperationException if the <tt>retainAll</tt> operation
* @return <code>true</code> if this collection changed as a result of the call
* @throws UnsupportedOperationException if the <code>retainAll</code> operation
* is not supported by this collection
* @throws ClassCastException if the types of one or more elements
* in this collection are incompatible with the specified
Expand All @@ -202,9 +202,9 @@ public interface DistributedCollectionService<E> extends IterableService<E> {
* collection.
*
* @param c collection containing elements to be removed from this collection
* @return <tt>true</tt> if this collection changed as a result of the
* @return <code>true</code> if this collection changed as a result of the
* call
* @throws UnsupportedOperationException if the <tt>removeAll</tt> method
* @throws UnsupportedOperationException if the <code>removeAll</code> method
* is not supported by this collection
* @throws ClassCastException if the types of one or more elements
* in this collection are incompatible with the specified
Expand All @@ -225,7 +225,7 @@ public interface DistributedCollectionService<E> extends IterableService<E> {
* Removes all of the elements from this collection (optional operation).
* The collection will be empty after this method returns.
*
* @throws UnsupportedOperationException if the <tt>clear</tt> operation
* @throws UnsupportedOperationException if the <code>clear</code> operation
* is not supported by this collection
*/
@Command
Expand Down
28 changes: 14 additions & 14 deletions core/src/main/java/io/atomix/core/list/AsyncDistributedList.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
* @param index index at which to insert the first element from the
* specified collection
* @param c collection containing elements to be added to this list
* @return <tt>true</tt> if this list changed as a result of the call
* @throws UnsupportedOperationException if the <tt>addAll</tt> operation
* @return <code>true</code> if this list changed as a result of the call
* @throws UnsupportedOperationException if the <code>addAll</code> operation
* is not supported by this list
* @throws ClassCastException if the class of an element of the specified
* collection prevents it from being added to this list
Expand All @@ -51,7 +51,7 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
* @throws IllegalArgumentException if some property of an element of the
* specified collection prevents it from being added to this list
* @throws IndexOutOfBoundsException if the index is out of range
* (<tt>index &lt; 0 || index &gt; size()</tt>)
* (<code>index &lt; 0 || index &gt; size()</code>)
*/
CompletableFuture<Boolean> addAll(int index, Collection<? extends E> c);

Expand All @@ -61,7 +61,7 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
* @param index index of the element to return
* @return the element at the specified position in this list
* @throws IndexOutOfBoundsException if the index is out of range
* (<tt>index &lt; 0 || index &gt;= size()</tt>)
* (<code>index &lt; 0 || index &gt;= size()</code>)
*/
CompletableFuture<E> get(int index);

Expand All @@ -72,7 +72,7 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
* @param index index of the element to replace
* @param element element to be stored at the specified position
* @return the element previously at the specified position
* @throws UnsupportedOperationException if the <tt>set</tt> operation
* @throws UnsupportedOperationException if the <code>set</code> operation
* is not supported by this list
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this list
Expand All @@ -81,7 +81,7 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
* @throws IllegalArgumentException if some property of the specified
* element prevents it from being added to this list
* @throws IndexOutOfBoundsException if the index is out of range
* (<tt>index &lt; 0 || index &gt;= size()</tt>)
* (<code>index &lt; 0 || index &gt;= size()</code>)
*/
CompletableFuture<E> set(int index, E element);

Expand All @@ -93,7 +93,7 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
*
* @param index index at which the specified element is to be inserted
* @param element element to be inserted
* @throws UnsupportedOperationException if the <tt>add</tt> operation
* @throws UnsupportedOperationException if the <code>add</code> operation
* is not supported by this list
* @throws ClassCastException if the class of the specified element
* prevents it from being added to this list
Expand All @@ -102,7 +102,7 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
* @throws IllegalArgumentException if some property of the specified
* element prevents it from being added to this list
* @throws IndexOutOfBoundsException if the index is out of range
* (<tt>index &lt; 0 || index &gt; size()</tt>)
* (<code>index &lt; 0 || index &gt; size()</code>)
*/
CompletableFuture<Void> add(int index, E element);

Expand All @@ -114,18 +114,18 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
*
* @param index the index of the element to be removed
* @return the element previously at the specified position
* @throws UnsupportedOperationException if the <tt>remove</tt> operation
* @throws UnsupportedOperationException if the <code>remove</code> operation
* is not supported by this list
* @throws IndexOutOfBoundsException if the index is out of range
* (<tt>index &lt; 0 || index &gt;= size()</tt>)
* (<code>index &lt; 0 || index &gt;= size()</code>)
*/
CompletableFuture<E> remove(int index);

/**
* Returns the index of the first occurrence of the specified element
* in this list, or -1 if this list does not contain the element.
* More formally, returns the lowest index <tt>i</tt> such that
* <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
* More formally, returns the lowest index <code>i</code> such that
* <code>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</code>,
* or -1 if there is no such index.
*
* @param o element to search for
Expand All @@ -143,8 +143,8 @@ public interface AsyncDistributedList<E> extends AsyncDistributedCollection<E> {
/**
* Returns the index of the last occurrence of the specified element
* in this list, or -1 if this list does not contain the element.
* More formally, returns the highest index <tt>i</tt> such that
* <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
* More formally, returns the highest index <code>i</code> such that
* <code>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</code>,
* or -1 if there is no such index.
*
* @param o element to search for
Expand Down
Loading

0 comments on commit 990bfe7

Please sign in to comment.