# Class RpcChannel.RpcCollector

java.lang.Object
org.apache.catalina.tribes.group.RpcChannel.RpcCollector

Enclosing class:
  `RpcChannel`

public static class RpcChannel.RpcCollector extends Object
Class that holds all response.

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`destcnt`
The destination count.
`final RpcChannel.RpcCollectorKey`
`key`
The collector key.
`final int`
`options`
The RPC options.
`final ArrayList<Response>`
`responses`
Collected responses.

## Constructor Summary

Constructors
Constructor
Description
`RpcCollector(RpcChannel.RpcCollectorKey key, int options, int destcnt)`
Create a new RpcCollector.

## Method Summary

Modifier and Type
Method
Description
`void`
`addResponse(Serializable message, Member sender)`
Add a response to the collector.
`boolean`
`equals(Object o)`
`Response[]`
`getResponses()`
Get the collected responses.
`int`
`hashCode()`
`boolean`
`isComplete()`
Check if the collector has received enough responses.

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### responses

public final ArrayList<Response> responses
Collected responses.

### key

public final RpcChannel.RpcCollectorKey key
The collector key.

### options

public final int options
The RPC options.

### destcnt

public int destcnt
The destination count.

## Constructor Details

### RpcCollector

public RpcCollector(RpcChannel.RpcCollectorKey key, int options, int destcnt)
Create a new RpcCollector.

Parameters:
  `key` - The collector key
  `options` - The RPC options
  `destcnt` - The destination count

## Method Details

### addResponse

public void addResponse(Serializable message, Member sender)
Add a response to the collector.

Parameters:
  `message` - The response message
  `sender` - The sender of the response

### isComplete

public boolean isComplete()
Check if the collector has received enough responses.

Returns:
  `true` if the collector is complete

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### getResponses

public Response[] getResponses()
Get the collected responses.

Returns:
  the collected responses