Changeset 5041bb85


Ignore:
Timestamp:
Oct 8, 2018 12:13:24 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
524c375
Parents:
7dfee5f
Message:

netdb class cleanup

Location:
router/java/src/net/i2p/router/networkdb/kademlia
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodOnlySearchJob.java

    r7dfee5f r5041bb85  
    3838 * knows one peer that is up.
    3939 */
    40 class FloodOnlySearchJob extends FloodSearchJob {
     40abstract class FloodOnlySearchJob extends FloodSearchJob {
    4141    private boolean _shouldProcessDSRM;
    4242    private final HashSet<Hash> _unheardFrom;
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodSearchJob.java

    r7dfee5f r5041bb85  
    2222 * Note that this does NOT extend SearchJob.
    2323 */
    24 public class FloodSearchJob extends JobImpl {
     24abstract class FloodSearchJob extends JobImpl {
    2525    protected final Log _log;
    2626    protected final FloodfillNetworkDatabaseFacade _facade;
  • router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java

    r7dfee5f r5041bb85  
    3434 *
    3535 */
    36 public class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
     36class HandleFloodfillDatabaseStoreMessageJob extends JobImpl {
    3737    private final Log _log;
    3838    private final DatabaseStoreMessage _message;
  • router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java

    r7dfee5f r5041bb85  
    5353 * Never instantiated directly; see FloodfillNetworkDatabaseFacade.
    5454 */
    55 public class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
     55public abstract class KademliaNetworkDatabaseFacade extends NetworkDatabaseFacade {
    5656    protected final Log _log;
    5757    private KBucketSet<Hash> _kb; // peer hashes sorted into kbuckets, but within kbuckets, unsorted
     
    188188    }
    189189
    190     protected PeerSelector createPeerSelector() { return new PeerSelector(_context); }
     190    protected abstract PeerSelector createPeerSelector();
    191191    public PeerSelector getPeerSelector() { return _peerSelector; }
    192192   
     
    12821282
    12831283    /** unused (overridden in FNDF) */
    1284     public void sendStore(Hash key, DatabaseEntry ds, Job onSuccess, Job onFailure, long sendTimeout, Set<Hash> toIgnore) {
    1285         if ( (ds == null) || (key == null) ) {
    1286             if (onFailure != null)
    1287                 _context.jobQueue().addJob(onFailure);
    1288             return;
    1289         }
    1290         _context.jobQueue().addJob(new StoreJob(_context, this, key, ds, onSuccess, onFailure, sendTimeout, toIgnore));
    1291     }
     1284    public abstract void sendStore(Hash key, DatabaseEntry ds, Job onSuccess, Job onFailure, long sendTimeout, Set<Hash> toIgnore);
    12921285
    12931286    /**
  • router/java/src/net/i2p/router/networkdb/kademlia/PeerSelector.java

    r7dfee5f r5041bb85  
    2727 *  Mostly unused, see overrides in FloodfillPeerSelector
    2828 */
    29 class PeerSelector {
     29abstract class PeerSelector {
    3030    protected final Log _log;
    3131    protected final RouterContext _context;
  • router/java/src/net/i2p/router/networkdb/kademlia/RepublishLeaseSetJob.java

    r7dfee5f r5041bb85  
    2121 *
    2222 */
    23 public class RepublishLeaseSetJob extends JobImpl {
     23class RepublishLeaseSetJob extends JobImpl {
    2424    private final Log _log;
    2525    public final static long REPUBLISH_LEASESET_TIMEOUT = 60*1000;
  • router/java/src/net/i2p/router/networkdb/kademlia/StoreJob.java

    r7dfee5f r5041bb85  
    3939 *  Unused directly - see FloodfillStoreJob
    4040 */
    41 class StoreJob extends JobImpl {
     41abstract class StoreJob extends JobImpl {
    4242    protected final Log _log;
    4343    private final KademliaNetworkDatabaseFacade _facade;
Note: See TracChangeset for help on using the changeset viewer.