public class Peer extends Object implements Communicant
| Modifier and Type | Field and Description |
|---|---|
private boolean |
closed |
private String |
clusterUrl |
private CommunicationsSession |
commsSession |
private PeerDescription |
description |
private Map<String,Long> |
penaltyExpirationMap |
private String |
url |
| Constructor and Description |
|---|
Peer(PeerDescription description,
CommunicationsSession commsSession,
String peerUrl,
String clusterUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
createTransitUri(String sourceFlowFileIdentifier) |
boolean |
equals(Object obj) |
String |
getClusterUrl() |
CommunicationsSession |
getCommunicationsSession() |
PeerDescription |
getDescription() |
String |
getDistinguishedName() |
String |
getHost() |
int |
getPort() |
String |
getUrl() |
int |
hashCode() |
boolean |
isClosed() |
boolean |
isPenalized(String destinationId) |
void |
penalize(String destinationId,
long millis)
Penalizes this peer for the given destination only for the provided
number of milliseconds
|
String |
toString() |
private final PeerDescription description
private final CommunicationsSession commsSession
private final String url
private final String clusterUrl
private boolean closed
public Peer(PeerDescription description, CommunicationsSession commsSession, String peerUrl, String clusterUrl)
public PeerDescription getDescription()
public String getUrl()
getUrl in interface Communicantpublic String getClusterUrl()
public CommunicationsSession getCommunicationsSession()
public void close()
throws IOException
IOExceptionpublic void penalize(String destinationId, long millis)
destinationId - id of destinationmillis - period of time to penalize peerpublic boolean isPenalized(String destinationId)
public boolean isClosed()
public String getHost()
getHost in interface Communicantpublic int getPort()
getPort in interface Communicantpublic String getDistinguishedName()
getDistinguishedName in interface Communicantnull
if the Distinguished Name is unknownpublic String createTransitUri(String sourceFlowFileIdentifier)
createTransitUri in interface CommunicantCopyright © 2023 Apache NiFi Project. All rights reserved.