abstract class ExcluderBase extends Object implements Set<Hash>
| Modifier and Type | Field and Description |
|---|---|
protected Map<Hash,String> | _reasonsMaps peer hash to the reason it was excluded, for diagnostic logging. |
protected Set<Hash> | sThe underlying set of excluded hashes. |
| Modifier | Constructor and Description |
|---|---|
protected | ExcluderBase(Set<Hash> set)Automatically check if peer is connected
and add the Hash to the set if not. |
| Modifier and Type | Method and Description |
|---|---|
boolean | add(Hash h)Add the hash to the underlying set. |
boolean | addAll(Collection<? extends Hash> c)Add all of the hashes to the underlying set. |
void | clear()Remove all hashes from the underlying set. |
abstract boolean | contains(Object o)Automatically check if peer is allowed
and add the Hash to the set if not. |
boolean | containsAll(Collection<?> c)Whether the underlying set contains all of the given hashes. |
boolean | equals(Object o)Whether the underlying set equals the given object. |
protected String | getReasonsSummary()Format exclusion summary grouped by reason (counts only, no peer hashes). |
int | hashCode()The hash code of the underlying set. |
boolean | isEmpty()Whether the underlying set is empty. |
Iterator<Hash> | iterator()An iterator over the underlying set. |
protected void | recordExclusion(Hash h,
String reason)Record why a peer was excluded, for diagnostic logging. |
boolean | remove(Object o)Remove the hash from the underlying set. |
boolean | removeAll(Collection<?> c)Remove all of the given hashes from the underlying set. |
boolean | retainAll(Collection<?> c)Retain only the given hashes in the underlying set. |
int | size()The number of hashes in the underlying set. |
Object[] | toArray()The hashes of the underlying set as an array. |
<Hash> Hash[] | toArray(Hash[] a)The hashes of the underlying set in the given array. |
String | toString()Description of the excluded set and its size. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streamprotected final Map<Hash,String> _reasons
recordExclusion(net.i2p.data.Hash, java.lang.String).public boolean add(Hash h)
public boolean addAll(Collection<? extends Hash> c)
public void clear()
public abstract boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<Hash>containsAll in interface Set<Hash>public boolean equals(Object o)
protected String getReasonsSummary()
_reasons.public int hashCode()
public boolean isEmpty()
protected void recordExclusion(Hash h, String reason)
h - the excluded peerreason - short reason string like "unreachable" or "not-ibgw"public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public int size()
public Object[] toArray()
public <Hash> Hash[] toArray(Hash[] a)