forked from I2P_Developers/i2p.i2p
remove unused private items (eclipse)
This commit is contained in:
@@ -8,7 +8,6 @@ class JobQueueRunner implements Runnable {
|
||||
private final RouterContext _context;
|
||||
private boolean _keepRunning;
|
||||
private final int _id;
|
||||
private long _numJobs;
|
||||
private Job _currentJob;
|
||||
private Job _lastJob;
|
||||
private long _lastBegin;
|
||||
|
||||
@@ -73,7 +73,6 @@ public class MessageHistory {
|
||||
_doLog = false;
|
||||
}
|
||||
|
||||
private void setDoLog(boolean log) { _doLog = log; }
|
||||
public boolean getDoLog() { return _doLog; }
|
||||
|
||||
/** @deprecated unused */
|
||||
|
||||
@@ -9,19 +9,15 @@ import net.i2p.util.Log;
|
||||
*/
|
||||
public class MessageStateMonitor {
|
||||
private Log _log;
|
||||
private RouterContext _context;
|
||||
private volatile int _inboundLiveCount;
|
||||
private volatile int _inboundReadCount;
|
||||
private volatile int _inboundFinalizedCount;
|
||||
private volatile int _outboundLiveCount;
|
||||
private volatile int _outboundDiscardedCount;
|
||||
|
||||
public MessageStateMonitor(RouterContext context) {
|
||||
_context = context;
|
||||
_log = context.logManager().getLog(MessageStateMonitor.class);
|
||||
_inboundLiveCount = 0;
|
||||
_inboundReadCount = 0;
|
||||
_inboundFinalizedCount = 0;
|
||||
_outboundLiveCount = 0;
|
||||
_outboundDiscardedCount = 0;
|
||||
}
|
||||
@@ -37,7 +33,6 @@ public class MessageStateMonitor {
|
||||
}
|
||||
public void inboundMessageFinalized() {
|
||||
_inboundReadCount--;
|
||||
_inboundFinalizedCount++;
|
||||
logStatus("inboundFinalized ");
|
||||
}
|
||||
|
||||
|
||||
@@ -24,17 +24,8 @@ class RouterThrottleImpl implements RouterThrottle {
|
||||
*
|
||||
*/
|
||||
private static int JOB_LAG_LIMIT = 2*1000;
|
||||
/**
|
||||
* Arbitrary hard limit - if we throttle our network connection this many
|
||||
* times in the previous 2 minute period, don't accept requests to
|
||||
* participate in tunnels.
|
||||
*
|
||||
*/
|
||||
private static int THROTTLE_EVENT_LIMIT = 30;
|
||||
|
||||
private static final String PROP_MAX_TUNNELS = "router.maxParticipatingTunnels";
|
||||
private static final int DEFAULT_MAX_TUNNELS = 5000;
|
||||
private static final String PROP_DEFAULT_KBPS_THROTTLE = "router.defaultKBpsThrottle";
|
||||
private static final String PROP_MAX_PROCESSINGTIME = "router.defaultProcessingTimeThrottle";
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,9 +52,6 @@ class ClientManager {
|
||||
/** SSL interface (only) @since 0.8.3 */
|
||||
private static final String PROP_ENABLE_SSL = "i2cp.SSL";
|
||||
|
||||
/** ms to wait before rechecking for inbound messages to deliver to clients */
|
||||
private final static int INBOUND_POLL_INTERVAL = 300;
|
||||
|
||||
public ClientManager(RouterContext context, int port) {
|
||||
_ctx = context;
|
||||
_log = context.logManager().getLog(ClientManager.class);
|
||||
|
||||
@@ -24,15 +24,11 @@ import net.i2p.util.Log;
|
||||
class MessageReceivedJob extends JobImpl {
|
||||
private Log _log;
|
||||
private ClientConnectionRunner _runner;
|
||||
private Destination _to;
|
||||
private Destination _from;
|
||||
private Payload _payload;
|
||||
public MessageReceivedJob(RouterContext ctx, ClientConnectionRunner runner, Destination toDest, Destination fromDest, Payload payload) {
|
||||
super(ctx);
|
||||
_log = ctx.logManager().getLog(MessageReceivedJob.class);
|
||||
_runner = runner;
|
||||
_to = toDest;
|
||||
_from = fromDest;
|
||||
_payload = payload;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,20 +29,12 @@ import net.i2p.util.Log;
|
||||
class RequestLeaseSetJob extends JobImpl {
|
||||
private final Log _log;
|
||||
private final ClientConnectionRunner _runner;
|
||||
private final LeaseSet _ls;
|
||||
private final long _expiration;
|
||||
private final Job _onCreate;
|
||||
private final Job _onFail;
|
||||
private final LeaseRequestState _requestState;
|
||||
|
||||
public RequestLeaseSetJob(RouterContext ctx, ClientConnectionRunner runner, LeaseSet set, long expiration, Job onCreate, Job onFail, LeaseRequestState state) {
|
||||
super(ctx);
|
||||
_log = ctx.logManager().getLog(RequestLeaseSetJob.class);
|
||||
_runner = runner;
|
||||
_ls = set;
|
||||
_expiration = expiration;
|
||||
_onCreate = onCreate;
|
||||
_onFail = onFail;
|
||||
_requestState = state;
|
||||
ctx.statManager().createRateStat("client.requestLeaseSetSuccess", "How frequently the router requests successfully a new leaseSet?", "ClientMessages", new long[] { 60*60*1000 });
|
||||
ctx.statManager().createRateStat("client.requestLeaseSetTimeout", "How frequently the router requests a new leaseSet but gets no reply?", "ClientMessages", new long[] { 60*60*1000 });
|
||||
|
||||
@@ -32,8 +32,6 @@ public class GarlicMessageReceiver {
|
||||
private final Hash _clientDestination;
|
||||
private final GarlicMessageParser _parser;
|
||||
|
||||
private final static int FORWARD_PRIORITY = 50;
|
||||
|
||||
public interface CloveReceiver {
|
||||
public void handleClove(DeliveryInstructions instructions, I2NPMessage data);
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ class HandleGarlicMessageJob extends JobImpl implements GarlicMessageReceiver.Cl
|
||||
//private MessageHandler _handler;
|
||||
//private GarlicMessageParser _parser;
|
||||
|
||||
private final static int FORWARD_PRIORITY = 50;
|
||||
|
||||
/**
|
||||
* @param from ignored
|
||||
* @param fromHash ignored
|
||||
|
||||
@@ -77,9 +77,6 @@ public class OutboundClientMessageOneShotJob extends JobImpl {
|
||||
private final static long OVERALL_TIMEOUT_MS_DEFAULT = 60*1000;
|
||||
private final static long OVERALL_TIMEOUT_MS_MIN = 8*1000;
|
||||
|
||||
/** priority of messages, that might get honored some day... */
|
||||
private final static int SEND_PRIORITY = 500;
|
||||
|
||||
/**
|
||||
* If the client's config specifies shouldBundleReplyInfo=true, messages sent from
|
||||
* that client to any peers will probabalistically include the sending destination's
|
||||
|
||||
@@ -37,8 +37,6 @@ import net.i2p.util.Log;
|
||||
public class HandleDatabaseLookupMessageJob extends JobImpl {
|
||||
private Log _log;
|
||||
private DatabaseLookupMessage _message;
|
||||
private RouterIdentity _from;
|
||||
private Hash _fromHash;
|
||||
private final static int MAX_ROUTERS_RETURNED = 3;
|
||||
private final static int CLOSENESS_THRESHOLD = 8; // FNDF.MAX_TO_FLOOD + 1
|
||||
private final static int REPLY_TIMEOUT = 60*1000;
|
||||
@@ -54,8 +52,6 @@ public class HandleDatabaseLookupMessageJob extends JobImpl {
|
||||
super(ctx);
|
||||
_log = getContext().logManager().getLog(HandleDatabaseLookupMessageJob.class);
|
||||
_message = receivedMessage;
|
||||
_from = from;
|
||||
_fromHash = fromHash;
|
||||
}
|
||||
|
||||
protected boolean answerAllQueries() { return false; }
|
||||
|
||||
@@ -32,9 +32,6 @@ public class HandleDatabaseStoreMessageJob extends JobImpl {
|
||||
private RouterIdentity _from;
|
||||
private Hash _fromHash;
|
||||
|
||||
private static final int ACK_TIMEOUT = 15*1000;
|
||||
private static final int ACK_PRIORITY = 100;
|
||||
|
||||
public HandleDatabaseStoreMessageJob(RouterContext ctx, DatabaseStoreMessage receivedMessage, RouterIdentity from, Hash fromHash) {
|
||||
super(ctx);
|
||||
_log = ctx.logManager().getLog(HandleDatabaseStoreMessageJob.class);
|
||||
|
||||
@@ -86,8 +86,6 @@ public class FloodSearchJob extends JobImpl {
|
||||
|
||||
protected static final int CONCURRENT_SEARCHES = 2;
|
||||
private static final int FLOOD_SEARCH_TIME_FACTOR = 2;
|
||||
private static final int FLOOD_SEARCH_TIME_MIN = 30*1000;
|
||||
|
||||
/**
|
||||
* Deprecated, unused, see FOSJ override
|
||||
*/
|
||||
|
||||
@@ -291,12 +291,6 @@ class FloodfillPeerSelector extends PeerSelector {
|
||||
_wanted = wanted;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return unsorted list of all with the 'f' mark in their netdb
|
||||
* except for shitlisted ones.
|
||||
*/
|
||||
public List<Hash> getFloodfillParticipants() { return _floodfillMatches; }
|
||||
|
||||
private static final int EXTRA_MATCHES = 100;
|
||||
public void add(Hash entry) {
|
||||
//if (_context.profileOrganizer().isFailing(entry))
|
||||
|
||||
@@ -35,9 +35,6 @@ public class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
|
||||
private Hash _fromHash;
|
||||
private FloodfillNetworkDatabaseFacade _facade;
|
||||
|
||||
private static final int ACK_TIMEOUT = 15*1000;
|
||||
private static final int ACK_PRIORITY = 100;
|
||||
|
||||
public HandleFloodfillDatabaseStoreMessageJob(RouterContext ctx, DatabaseStoreMessage receivedMessage, RouterIdentity from, Hash fromHash, FloodfillNetworkDatabaseFacade facade) {
|
||||
super(ctx);
|
||||
_log = ctx.logManager().getLog(getClass());
|
||||
|
||||
@@ -43,7 +43,6 @@ class KBucketImpl implements KBucket {
|
||||
private int _end;
|
||||
/** when did we last shake things up */
|
||||
private long _lastShuffle;
|
||||
private static final int SHUFFLE_DELAY = 10*60*1000;
|
||||
private I2PAppContext _context;
|
||||
|
||||
public KBucketImpl(I2PAppContext context, LocalHash local) {
|
||||
|
||||
@@ -409,18 +409,6 @@ public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* aparently, not used?? should be public if used elsewhere. */
|
||||
private class CountLeaseSets implements SelectionCollector {
|
||||
private int _count;
|
||||
public int size() { return _count; }
|
||||
public void add(Hash entry) {
|
||||
if (_ds == null) return;
|
||||
DatabaseEntry o = _ds.get(entry);
|
||||
if (o != null && o.getType() == DatabaseEntry.KEY_TYPE_LEASESET)
|
||||
_count++;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is fast and doesn't use synchronization,
|
||||
* but it includes both routerinfos and leasesets.
|
||||
|
||||
@@ -204,11 +204,6 @@ class PersistentDataStore extends TransientDataStore {
|
||||
_context.statManager().addRateData("netDb.writePending", pending);
|
||||
}
|
||||
|
||||
/** check to see if it's in the write queue */
|
||||
public DatabaseEntry get(Hash key) {
|
||||
return _keys.get(key);
|
||||
}
|
||||
|
||||
public void remove(Hash key) {
|
||||
_keys.remove(key);
|
||||
}
|
||||
@@ -502,10 +497,6 @@ class PersistentDataStore extends TransientDataStore {
|
||||
return ROUTERINFO_PREFIX + hash.toBase64() + ROUTERINFO_SUFFIX;
|
||||
}
|
||||
|
||||
private static Hash getLeaseSetHash(String filename) {
|
||||
return getHash(filename, LEASESET_PREFIX, LEASESET_SUFFIX);
|
||||
}
|
||||
|
||||
private static Hash getRouterInfoHash(String filename) {
|
||||
return getHash(filename, ROUTERINFO_PREFIX, ROUTERINFO_SUFFIX);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import net.i2p.util.Log;
|
||||
*/
|
||||
public class RepublishLeaseSetJob extends JobImpl {
|
||||
private final Log _log;
|
||||
private final static long REPUBLISH_LEASESET_DELAY = 5*60*1000;
|
||||
public final static long REPUBLISH_LEASESET_TIMEOUT = 60*1000;
|
||||
private final static int RETRY_DELAY = 20*1000;
|
||||
private final Hash _dest;
|
||||
|
||||
@@ -46,7 +46,6 @@ class SearchJob extends JobImpl {
|
||||
private final long _expiration;
|
||||
private final long _timeoutMs;
|
||||
private final boolean _keepStats;
|
||||
private final boolean _isLease;
|
||||
private Job _pendingRequeueJob;
|
||||
private final PeerSelector _peerSelector;
|
||||
private final List _deferredSearches;
|
||||
@@ -56,7 +55,6 @@ class SearchJob extends JobImpl {
|
||||
private int _floodfillSearchesOutstanding;
|
||||
|
||||
private static final int SEARCH_BREDTH = 3; // 10 peers at a time
|
||||
private static final int SEARCH_PRIORITY = 400; // large because the search is probably for a real search
|
||||
/** only send the 10 closest "dont tell me about" refs */
|
||||
static final int MAX_CLOSEST = 10;
|
||||
|
||||
@@ -96,7 +94,6 @@ class SearchJob extends JobImpl {
|
||||
_onFailure = onFailure;
|
||||
_timeoutMs = timeoutMs;
|
||||
_keepStats = keepStats;
|
||||
_isLease = isLease;
|
||||
_deferredSearches = new ArrayList(0);
|
||||
_peerSelector = facade.getPeerSelector();
|
||||
_startedOn = -1;
|
||||
@@ -759,7 +756,6 @@ class SearchJob extends JobImpl {
|
||||
public Job getOnFind() { return _onFind; }
|
||||
public Job getOnFail() { return _onFail; }
|
||||
public long getExpiration() { return _expiration; }
|
||||
public boolean getIsLease() { return _isLease; }
|
||||
}
|
||||
|
||||
public String getName() { return "Kademlia NetDb Search"; }
|
||||
|
||||
@@ -43,16 +43,6 @@ class StoreJob extends JobImpl {
|
||||
|
||||
private final static int PARALLELIZATION = 4; // how many sent at a time
|
||||
private final static int REDUNDANCY = 4; // we want the data sent to 6 peers
|
||||
/**
|
||||
* additionally send to 1 outlier(s), in case all of the routers chosen in our
|
||||
* REDUNDANCY set are attacking us by accepting DbStore messages but dropping
|
||||
* the data.
|
||||
*
|
||||
* TODO: um, honor this. make sure we send to this many peers that aren't
|
||||
* closest to the key.
|
||||
*
|
||||
*/
|
||||
private final static int EXPLORATORY_REDUNDANCY = 1;
|
||||
private final static int STORE_PRIORITY = 100;
|
||||
|
||||
/**
|
||||
|
||||
@@ -501,16 +501,6 @@ public class Reseeder {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark a string for extraction by xgettext and translation.
|
||||
* Use this only in static initializers.
|
||||
* It does not translate!
|
||||
* @return s
|
||||
*/
|
||||
private static final String _x(String s) {
|
||||
return s;
|
||||
}
|
||||
|
||||
private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
|
||||
|
||||
/** translate */
|
||||
|
||||
@@ -32,8 +32,6 @@ public class PeerTestJob extends JobImpl {
|
||||
private PeerManager _manager;
|
||||
private boolean _keepTesting;
|
||||
private static final long DEFAULT_PEER_TEST_DELAY = 5*60*1000;
|
||||
private static final int TEST_PRIORITY = 100;
|
||||
|
||||
/** Creates a new instance of PeerTestJob */
|
||||
public PeerTestJob(RouterContext context) {
|
||||
super(context);
|
||||
|
||||
@@ -148,11 +148,6 @@ public class ProfileManagerImpl implements ProfileManager {
|
||||
}
|
||||
|
||||
|
||||
private int getSlowThreshold() {
|
||||
// perhaps we should have this compare vs. tunnel.testSuccessTime?
|
||||
return 5*1000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Note that the peer participated in a tunnel that failed. Its failure may not have
|
||||
* been the peer's fault however.
|
||||
|
||||
@@ -808,10 +808,6 @@ public class FIFOBandwidthLimiter {
|
||||
satisfiedBuffer = new ArrayList(1);
|
||||
init(0, 0, null);
|
||||
}
|
||||
public SimpleRequest(int in, int out, String target) {
|
||||
satisfiedBuffer = new ArrayList(1);
|
||||
init(in, out, target);
|
||||
}
|
||||
public SimpleRequest(int in, int out, String target, CompleteListener lsnr, Object attachment) {
|
||||
satisfiedBuffer = new ArrayList(1);
|
||||
_lsnr = lsnr;
|
||||
@@ -830,7 +826,6 @@ public class FIFOBandwidthLimiter {
|
||||
_requestId = ++__requestId;
|
||||
_requestTime = now();
|
||||
}
|
||||
public Object getAvailabilityMonitor() { return SimpleRequest.this; }
|
||||
public String getRequestName() { return "Req" + _requestId + " to " + _target; }
|
||||
public long getRequestTime() { return _requestTime; }
|
||||
public int getTotalOutboundRequested() { return _outTotal; }
|
||||
@@ -873,14 +868,6 @@ public class FIFOBandwidthLimiter {
|
||||
_lsnr.complete(SimpleRequest.this);
|
||||
}
|
||||
int getAllocationsSinceWait() { return _waited ? _allocationsSinceWait : 0; }
|
||||
void allocateAll() {
|
||||
_inAllocated = _inTotal;
|
||||
_outAllocated = _outTotal;
|
||||
if (_lsnr == null)
|
||||
_allocationsSinceWait++;
|
||||
if (_log.shouldLog(Log.DEBUG)) _log.debug("allocate all");
|
||||
notifyAllocation();
|
||||
}
|
||||
void allocateBytes(int in, int out) {
|
||||
_inAllocated += in;
|
||||
_outAllocated += out;
|
||||
|
||||
@@ -193,15 +193,6 @@ public class TransportManager implements TransportEventListener {
|
||||
|
||||
int getTransportCount() { return _transports.size(); }
|
||||
|
||||
private boolean isSupported(Set addresses, Transport t) {
|
||||
for (Iterator iter = addresses.iterator(); iter.hasNext(); ) {
|
||||
RouterAddress addr = (RouterAddress)iter.next();
|
||||
if (addr.getTransportStyle().equals(t.getStyle()))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int countActivePeers() {
|
||||
int peers = 0;
|
||||
for (Transport t : _transports.values()) {
|
||||
|
||||
@@ -93,9 +93,6 @@ class EstablishState {
|
||||
|
||||
/** bytes received so far */
|
||||
private int _received;
|
||||
/** bytes sent so far */
|
||||
private int _sent;
|
||||
|
||||
private byte _extra[];
|
||||
|
||||
private final DHSessionKeyBuilder _dh;
|
||||
|
||||
@@ -14,7 +14,6 @@ import net.i2p.util.Log;
|
||||
*
|
||||
*/
|
||||
class Writer {
|
||||
private final RouterContext _context;
|
||||
private final Log _log;
|
||||
private final List<NTCPConnection> _pendingConnections;
|
||||
private final List<NTCPConnection> _liveWrites;
|
||||
@@ -22,7 +21,6 @@ class Writer {
|
||||
private final List<Runner> _runners;
|
||||
|
||||
public Writer(RouterContext ctx) {
|
||||
_context = ctx;
|
||||
_log = ctx.logManager().getLog(getClass());
|
||||
_pendingConnections = new ArrayList(16);
|
||||
_runners = new ArrayList(5);
|
||||
|
||||
@@ -431,8 +431,6 @@ class PacketBuilder {
|
||||
return buildACK(peer, Collections.EMPTY_LIST);
|
||||
}
|
||||
|
||||
private static final int ACK_PRIORITY = 1;
|
||||
|
||||
/**
|
||||
* Build the ack packet. The list need not be sorted into full and partial;
|
||||
* this method will put all fulls before the partials in the outgoing packet.
|
||||
|
||||
@@ -180,8 +180,6 @@ class PeerState {
|
||||
private long _packetsPeriodTransmitted;
|
||||
private int _packetsPeriodRetransmitted;
|
||||
private int _packetRetransmissionRate;
|
||||
/** at what time did we last break off the retransmission counter period */
|
||||
private long _retransmissionPeriodStart;
|
||||
/** how many dup packets were received within the last RETRANSMISSION_PERIOD_WIDTH packets */
|
||||
private long _packetsReceivedDuplicate;
|
||||
private long _packetsReceived;
|
||||
|
||||
@@ -187,11 +187,13 @@ class UDPReceiver {
|
||||
return queueSize;
|
||||
}
|
||||
|
||||
/****
|
||||
private class ArtificiallyDelayedReceive implements SimpleTimer.TimedEvent {
|
||||
private UDPPacket _packet;
|
||||
public ArtificiallyDelayedReceive(UDPPacket packet) { _packet = packet; }
|
||||
public void timeReached() { doReceive(_packet); }
|
||||
}
|
||||
****/
|
||||
|
||||
/**
|
||||
* Blocking call to retrieve the next inbound packet, or null if we have
|
||||
|
||||
@@ -98,8 +98,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
private int _lastOurPort;
|
||||
|
||||
private static final int DROPLIST_PERIOD = 10*60*1000;
|
||||
private static final int MAX_DROPLIST_SIZE = 256;
|
||||
|
||||
public static final String STYLE = "SSU";
|
||||
public static final String PROP_INTERNAL_PORT = "i2np.udp.internalPort";
|
||||
/** now unused, we pick a random port */
|
||||
@@ -1456,8 +1454,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static final int DROP_INACTIVITY_TIME = 60*1000;
|
||||
|
||||
public void failed(OutboundMessageState msg) { failed(msg, true); }
|
||||
void failed(OutboundMessageState msg, boolean allowPeerFailure) {
|
||||
if (msg == null) return;
|
||||
@@ -2218,13 +2214,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
}
|
||||
}
|
||||
private static final DecimalFormat _pctFmt = new DecimalFormat("#0.0%");
|
||||
private static final String formatPct(double pct) {
|
||||
synchronized (_pctFmt) {
|
||||
return _pctFmt.format(pct);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static final String BUNDLE_NAME = "net.i2p.router.web.messages";
|
||||
|
||||
/**
|
||||
@@ -2311,15 +2300,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If we haven't had a non-unknown test result in 5 minutes, we really dont know. Otherwise,
|
||||
* when we receive an unknown we should ignore that value and try again (with different peers)
|
||||
*
|
||||
*/
|
||||
private static final long STATUS_GRACE_PERIOD = 5*60*1000;
|
||||
private long _statusLastCalled;
|
||||
private short _lastStatus = CommSystemFacade.STATUS_UNKNOWN;
|
||||
|
||||
void setReachabilityStatus(short status) {
|
||||
short old = _reachabilityStatus;
|
||||
long now = _context.clock().now();
|
||||
@@ -2355,8 +2335,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
//}
|
||||
break;
|
||||
}
|
||||
_statusLastCalled = now;
|
||||
_lastStatus = status;
|
||||
if ( (status != old) && (status != CommSystemFacade.STATUS_UNKNOWN) ) {
|
||||
if (_log.shouldLog(Log.INFO))
|
||||
_log.info("Old status: " + old + " New status: " + status + " from: ", new Exception("traceback"));
|
||||
@@ -2404,8 +2382,6 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
return null;
|
||||
}
|
||||
|
||||
private static final String PROP_SHOULD_TEST = "i2np.udp.shouldTest";
|
||||
|
||||
private boolean shouldTest() {
|
||||
return ! _context.router().isHidden();
|
||||
//String val = _context.getProperty(PROP_SHOULD_TEST);
|
||||
|
||||
@@ -32,8 +32,6 @@ class InboundMessageDistributor implements GarlicMessageReceiver.CloveReceiver {
|
||||
private final Hash _client;
|
||||
private final GarlicMessageReceiver _receiver;
|
||||
|
||||
private static final int MAX_DISTRIBUTE_TIME = 10*1000;
|
||||
|
||||
public InboundMessageDistributor(RouterContext ctx, Hash client) {
|
||||
_context = ctx;
|
||||
_client = client;
|
||||
|
||||
@@ -143,7 +143,7 @@ class TrivialPreprocessor implements TunnelGateway.QueuePreprocessor {
|
||||
/** is this a follw up byte? */
|
||||
private static final byte MASK_IS_SUBSEQUENT = FragmentHandler.MASK_IS_SUBSEQUENT;
|
||||
/** how should this be delivered? shift this 5 the right and get TYPE_* */
|
||||
private static final byte MASK_TYPE = FragmentHandler.MASK_TYPE;
|
||||
//private static final byte MASK_TYPE = FragmentHandler.MASK_TYPE;
|
||||
/** is this the first of a fragmented message? */
|
||||
private static final byte MASK_FRAGMENTED = FragmentHandler.MASK_FRAGMENTED;
|
||||
|
||||
|
||||
@@ -186,7 +186,6 @@ abstract class BuildRequestor {
|
||||
private static final boolean SEND_VARIABLE = true;
|
||||
/** 5 (~2600 bytes) fits nicely in 3 tunnel messages */
|
||||
private static final int SHORT_RECORDS = 5;
|
||||
private static final int LONG_RECORDS = TunnelBuildMessage.MAX_RECORD_COUNT;
|
||||
private static final VersionComparator _versionComparator = new VersionComparator();
|
||||
private static final List<Integer> SHORT_ORDER = new ArrayList(SHORT_RECORDS);
|
||||
static {
|
||||
|
||||
@@ -15,10 +15,6 @@ import net.i2p.util.Log;
|
||||
class PooledTunnelCreatorConfig extends TunnelCreatorConfig {
|
||||
private TunnelPool _pool;
|
||||
private TestJob _testJob;
|
||||
// private Job _expireJob;
|
||||
// private TunnelInfo _pairedTunnel;
|
||||
private boolean _live;
|
||||
|
||||
/** Creates a new instance of PooledTunnelCreatorConfig */
|
||||
|
||||
public PooledTunnelCreatorConfig(RouterContext ctx, int length, boolean isInbound) {
|
||||
@@ -34,13 +30,11 @@ class PooledTunnelCreatorConfig extends TunnelCreatorConfig {
|
||||
if (_testJob != null)
|
||||
_testJob.testSuccessful(ms);
|
||||
super.testSuccessful(ms);
|
||||
_live = true;
|
||||
}
|
||||
|
||||
/** called from TestJob */
|
||||
public void testJobSuccessful(int ms) {
|
||||
super.testSuccessful(ms);
|
||||
_live = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -337,7 +337,6 @@ public abstract class TunnelPeerSelector {
|
||||
}
|
||||
}
|
||||
|
||||
private static final long DONT_EXCLUDE_PERIOD = 15*60*1000;
|
||||
/** 0.7.8 and earlier had major message corruption bugs */
|
||||
private static final String MIN_VERSION = "0.7.9";
|
||||
private static final VersionComparator _versionComparator = new VersionComparator();
|
||||
|
||||
Reference in New Issue
Block a user