Changeset 14f61bb


Ignore:
Timestamp:
Dec 13, 2011 3:16:07 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
a0c6287
Parents:
cd30545
Message:
Location:
router/java/src/net/i2p/router/transport
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/TransportBid.java

    rcd30545 r14f61bb  
    1818public class TransportBid {
    1919    private int _latencyMs;
    20     private int _bandwidthBytes;
    21     private int _msgSize;
    22     private RouterInfo _router;
    23     private long _bidExpiration;
     20    //private int _bandwidthBytes;
     21    //private int _msgSize;
     22    //private RouterInfo _router;
     23    //private long _bidExpiration;
    2424    private Transport _transport;
    2525   
     
    2727
    2828    public TransportBid() {
    29         setLatencyMs(-1);
    30         setBandwidthBytes(-1);
    31         setMessageSize(-1);
    32         setRouter(null);
    33         setExpiration(0);
    34         setTransport(null);
     29        _latencyMs = -1;
     30        //_bandwidthBytes = -1;
     31        //_msgSize = -1;
    3532    }
    3633   
    3734    /**
    3835     * How long this transport thinks it would take to send the message
     36     * This is the actual bid value, lower is better, and it doesn't really have
     37     * anything to do with latency.
    3938     */
    4039    public int getLatencyMs() { return _latencyMs; }
     
    4645     *
    4746     */
    48     public int getBandwidthBytes() { return _bandwidthBytes; }
    49     public void setBandwidthBytes(int numBytes) { _bandwidthBytes = numBytes; }
     47    //public int getBandwidthBytes() { return _bandwidthBytes; }
     48    //public void setBandwidthBytes(int numBytes) { _bandwidthBytes = numBytes; }
    5049   
    5150    /**
     
    5352     *
    5453     */
    55     public int getMessageSize() { return _msgSize; }
    56     public void setMessageSize(int numBytes) { _msgSize = numBytes; }
     54    //public int getMessageSize() { return _msgSize; }
     55    //public void setMessageSize(int numBytes) { _msgSize = numBytes; }
    5756   
    5857    /**
     
    6059     *
    6160     */
    62     public RouterInfo getRouter() { return _router; }
    63     public void setRouter(RouterInfo router) { _router = router; }
     61    //public RouterInfo getRouter() { return _router; }
     62    //public void setRouter(RouterInfo router) { _router = router; }
    6463   
    6564    /**
    6665     * Specifies how long this bid is "good for"
    6766     */
    68     public long getExpiration() { return _bidExpiration; }
    69     public void setExpiration(long expirationDate) { _bidExpiration = expirationDate; }
     67    //public long getExpiration() { return _bidExpiration; }
     68    //public void setExpiration(long expirationDate) { _bidExpiration = expirationDate; }
    7069    //public void setExpiration(long expirationDate) { setExpiration(new Date(expirationDate)); }
    7170   
  • router/java/src/net/i2p/router/transport/TransportManager.java

    rcd30545 r14f61bb  
    404404    }
    405405   
    406     @SuppressWarnings("static-access")
    407406    public TransportBid getNextBid(OutNetMessage msg) {
    408407        int unreachableTransports = 0;
     
    428427            TransportBid bid = t.bid(msg.getTarget(), msg.getMessageSize());
    429428            if (bid != null) {
    430                 /* FIXME Accessing static field "TRANSIENT_FAIL" FIXME */
    431                 if (bid.getLatencyMs() == bid.TRANSIENT_FAIL)
     429                if (bid.getLatencyMs() == TransportBid.TRANSIENT_FAIL)
    432430                    // this keeps GetBids() from shitlisting for "no common transports"
    433431                    msg.transportFailed(t.getStyle());
Note: See TracChangeset for help on using the changeset viewer.