public class RemoteCollectorImpl<T> extends UnicastRemoteObject implements RemoteCollector<T>
RemoteCollectorOutputFormat
.ref
Modifier and Type | Method and Description |
---|---|
void |
collect(T element)
This method is called by the remote to collect records.
|
static <T> void |
collectLocal(DataSet<T> source,
Collection<T> collection)
Writes a DataSet to a local
Collection through an
RemoteCollector and a standard RemoteCollectorConsumer
implementation remotely called from the
RemoteCollectorOutputFormat . |
static <T> DataSink<T> |
collectLocal(DataSet<T> source,
RemoteCollectorConsumer<T> consumer)
Writes a DataSet to a
RemoteCollectorConsumer through an
RemoteCollector remotely called from the
RemoteCollectorOutputFormat . |
static <T> void |
createAndBind(Integer port,
RemoteCollectorConsumer<T> consumer,
String rmiId)
This factory method creates an instance of the
RemoteCollectorImpl and binds it in the local RMI
Registry . |
RemoteCollectorConsumer<T> |
getConsumer() |
void |
setConsumer(RemoteCollectorConsumer<T> consumer) |
static void |
shutdownAll()
This method unbinds and unexports all exposed
Remote objects |
clone, exportObject, exportObject, exportObject, unexportObject
getClientHost, getLog, setLog
public static <T> void createAndBind(Integer port, RemoteCollectorConsumer<T> consumer, String rmiId)
RemoteCollectorImpl
and binds it in the local RMI
Registry
.port
- The port where the local colector is listening.consumer
- The consumer instance.rmiId
- An ID to register the collector in the RMI registry.public static <T> DataSink<T> collectLocal(DataSet<T> source, RemoteCollectorConsumer<T> consumer)
RemoteCollectorConsumer
through an
RemoteCollector
remotely called from the
RemoteCollectorOutputFormat
.public static <T> void collectLocal(DataSet<T> source, Collection<T> collection)
Collection
through an
RemoteCollector
and a standard RemoteCollectorConsumer
implementation remotely called from the
RemoteCollectorOutputFormat
.source
- the source data setcollection
- the local collectionpublic void collect(T element) throws RemoteException
collect
in interface RemoteCollector<T>
RemoteException
public RemoteCollectorConsumer<T> getConsumer()
getConsumer
in interface RemoteCollector<T>
public void setConsumer(RemoteCollectorConsumer<T> consumer)
setConsumer
in interface RemoteCollector<T>
public static void shutdownAll() throws AccessException, RemoteException, NotBoundException
Remote
objectsCopyright © 2015 The Apache Software Foundation. All rights reserved.