Permalink
Browse files

More minor javadoc and method duplication in interface cleanup

  • Loading branch information...
pveentjer committed Oct 5, 2014
1 parent 0e2ff93 commit 2d9eabe82a0a0568d2c92c7d53a5383efb32cf7d
@@ -3,7 +3,7 @@
import java.util.EventObject;
/**
* Abstract map event.
* An abstract {@link com.hazelcast.core.IMapEvent}.
*/
public abstract class AbstractIMapEvent extends EventObject implements IMapEvent {
@@ -19,8 +19,7 @@
import java.util.EventListener;
/**
* ClientListener allows to get notified when a {@link Client} is connected to
* or disconnected from cluster.
* The ClientListener provides the ability to listen to clients connecting and disconnecting from the cluster.
*
* @see Client
* @see ClientService#addClientListener(ClientListener)
@@ -21,10 +21,6 @@
*/
public class DuplicateInstanceNameException extends HazelcastException {
public DuplicateInstanceNameException() {
super();
}
public DuplicateInstanceNameException(String message) {
super(message);
}
@@ -17,15 +17,12 @@
package com.hazelcast.core;
/**
*
* Used to get HazelcastInstance reference when submitting a Runnable/Callable using Hazelcast ExecutorService.
* Before executing the Runnable/Callable Hazelcast will invoke
* {@link HazelcastInstanceAware#setHazelcastInstance(HazelcastInstance)} method with the reference to HazelcastInstance
* that is executing. This way the implementer will have a chance to get the reference to HazelcastInstance.
*
*/
public interface HazelcastInstanceAware {
void setHazelcastInstance(HazelcastInstance hazelcastInstance);
}
@@ -23,6 +23,7 @@
* @see IAtomicReference
*/
public interface IAtomicLong extends DistributedObject {
/**
* Returns the name of this IAtomicLong instance.
*
@@ -24,6 +24,7 @@
* @param <E> item
*/
public interface ICollection<E> extends Collection<E>, DistributedObject {
/**
* Returns the name of this collection
*
@@ -16,14 +16,12 @@
package com.hazelcast.core;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
/**
* Distributed implementation of {@link Condition}.
* An ICondition instance is created using {@link ILock#newCondition(String)}
*
* <p/>
* <pre>
* HazelcastInstance instance = ...;
* ILock lock = instance.getLock("lock");
@@ -36,39 +34,4 @@
*/
public interface ICondition extends Condition {
/**
* {@inheritDoc}
*/
void await() throws InterruptedException;
/**
* {@inheritDoc}
*/
void awaitUninterruptibly();
/**
* {@inheritDoc}
*/
long awaitNanos(long nanosTimeout) throws InterruptedException;
/**
* {@inheritDoc}
*/
boolean await(long time, TimeUnit unit) throws InterruptedException;
/**
* {@inheritDoc}
*/
boolean awaitUntil(Date deadline) throws InterruptedException;
/**
* {@inheritDoc}
*/
void signal();
/**
* {@inheritDoc}
*/
void signalAll();
}
@@ -119,5 +119,4 @@
* @throws IllegalArgumentException if {@code count} is negative
*/
boolean trySetCount(int count);
}
@@ -21,6 +21,9 @@
/**
* Concurrent, distributed implementation of {@link List}
*
* The Hazelcast IList is not a partitioned data-structure. So all the content of the IList is stored in a single machine (and
* in the backup). So the IList will not scale by adding more members in the cluster.
*
* @param <E>
* @see List
*/
@@ -26,7 +26,8 @@
/**
* Concurrent, blocking, distributed, observable queue.
*
* Queues are stored in one node in the cluster with one backup.
* The IQueue is not a partitioned data-structure. So all the content of the IQueue is stored in a single machine (and
* in the backup). So the IQueue will not scale by adding more members in the cluster.
*
* @see BaseQueue
* @see java.util.Queue
@@ -36,136 +37,6 @@
*/
public interface IQueue<E> extends BlockingQueue<E>, BaseQueue<E>, ICollection<E> {
/**
* {@inheritDoc}
*/
boolean add(E e);
/**
* {@inheritDoc}
*/
boolean offer(E e);
/**
* {@inheritDoc}
*/
void put(E e) throws InterruptedException;
/**
* {@inheritDoc}
*/
boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException;
/**
* {@inheritDoc}
*/
E take() throws InterruptedException;
/**
* {@inheritDoc}
*/
E poll(long timeout, TimeUnit unit) throws InterruptedException;
/**
* {@inheritDoc}
*/
int remainingCapacity();
/**
* {@inheritDoc}
*/
boolean remove(Object o);
/**
* {@inheritDoc}
*/
boolean contains(Object o);
/**
* {@inheritDoc}
*/
int drainTo(Collection<? super E> c);
/**
* {@inheritDoc}
*/
int drainTo(Collection<? super E> c, int maxElements);
/**
* {@inheritDoc}
*/
E remove();
/**
* {@inheritDoc}
*/
E poll();
/**
* {@inheritDoc}
*/
E element();
/**
* {@inheritDoc}
*/
E peek();
/**
* {@inheritDoc}
*/
int size();
/**
* {@inheritDoc}
*/
boolean isEmpty();
/**
* {@inheritDoc}
*
* <p> The view's <tt>iterator</tt> is a "weakly consistent" iterator,
* and guarantees to traverse elements as they existed upon
* construction of the iterator, and may (but is not guaranteed to)
* reflect any modifications subsequent to construction.
*/
Iterator<E> iterator();
/**
* {@inheritDoc}
*/
Object[] toArray();
/**
* {@inheritDoc}
*/
<T> T[] toArray(T[] a);
/**
* {@inheritDoc}
*/
boolean containsAll(Collection<?> c);
/**
* {@inheritDoc}
*/
boolean addAll(Collection<? extends E> c);
/**
* {@inheritDoc}
*/
boolean removeAll(Collection<?> c);
/**
* {@inheritDoc}
*/
boolean retainAll(Collection<?> c);
/**
* {@inheritDoc}
*/
void clear();
/**
* Returns LocalQueueStats for this queue.
* LocalQueueStats is the statistics for the local portion of this
@@ -41,7 +41,7 @@
/**
* Publishes the message to all subscribers of this topic
*
* @param message
* @param message the message to publish
*/
void publish(E message);
@@ -17,7 +17,17 @@
package com.hazelcast.core;
/**
* Cluster-wide unique id generator.
* The IdGenerator is responsible for creating unique id's (a long) in a cluster.
*
* In theory a {@link com.hazelcast.core.IAtomicLong#incrementAndGet()} could be used to provide the same functionality.
* The big difference is that the incrementAndGet requires one or more remote calls for every invocation and therefor
* is a performance and scalability bottleneck. The IdGenerator uses an IAtomicLong under the hood, but instead of
* doing remote call for every call to {@link #newId()}, it does it less frequently. It checks out a chunk, e.g. 1..1000 and
* as long as it has not yet consumed all the id's in its chunk, then no remote call is done.
*
* It can be that id's generated by different cluster members get out of order because each member will get its own chunk. It
* could be that member 1 has chunk 1..1000 and member 2 has 1001..2000. So therefor member 2 will automatically have id's that
* are out of order with the id's generated by member 1.
*/
public interface IdGenerator extends DistributedObject {
@@ -27,7 +27,7 @@
import java.util.concurrent.ExecutionException;
/**
* Thrown when a member left during an invocation or execution.
* A {@link ExecutionException} thrown when a member left during an invocation or execution.
*/
public class MemberLeftException extends ExecutionException implements RetryableException {
@@ -17,22 +17,21 @@
package com.hazelcast.core;
/**
* Adapter for MembershipListener.
* Adapter for MembershipListener. All the methods are implemented and only override the relevant methods
*
* @see com.hazelcast.core.MembershipListener
*/
public class MembershipAdapter implements MembershipListener {
@Override
public void memberAdded(final MembershipEvent membershipEvent) {
public void memberAdded(MembershipEvent membershipEvent) {
}
@Override
public void memberRemoved(final MembershipEvent membershipEvent) {
public void memberRemoved(MembershipEvent membershipEvent) {
}
@Override
public void memberAttributeChanged(final MemberAttributeEvent memberAttributeEvent) {
public void memberAttributeChanged(MemberAttributeEvent memberAttributeEvent) {
}
}
@@ -24,6 +24,7 @@
* @param <E> message
*/
public interface MessageListener<E> extends EventListener {
/**
* Invoked when a message is received for the added topic. Note that topic guarantees message ordering.
* Therefore there is only one thread invoking onMessage. The user shouldn't keep the thread busy and preferably
@@ -19,7 +19,7 @@
import java.util.EventListener;
/**
* MigrationListener allows to listen partition migration events.
* MigrationListener provides the ability to listen to partition migration events.
*
* @see Partition
* @see PartitionService
@@ -25,7 +25,6 @@
*
* @see IExecutorService
* @see ExecutionCallback
*
*/
public interface MultiExecutionCallback {

0 comments on commit 2d9eabe

Please sign in to comment.