From e26df1c26bc330502727f0b388af8212db8535bc Mon Sep 17 00:00:00 2001 From: zzz Date: Mon, 10 May 2010 14:52:53 +0000 Subject: [PATCH] * LeaseSet: Add receivedAsReply() methods in preparation for some netdb changes --- core/java/src/net/i2p/data/LeaseSet.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/java/src/net/i2p/data/LeaseSet.java b/core/java/src/net/i2p/data/LeaseSet.java index a917f6ac0..061091c61 100644 --- a/core/java/src/net/i2p/data/LeaseSet.java +++ b/core/java/src/net/i2p/data/LeaseSet.java @@ -66,6 +66,7 @@ public class LeaseSet extends DataStructureImpl { private volatile Hash _currentRoutingKey; private volatile byte[] _routingKeyGenMod; private boolean _receivedAsPublished; + private boolean _receivedAsReply; // Store these since isCurrent() and getEarliestLeaseDate() are called frequently private long _firstExpiration; private long _lastExpiration; @@ -119,11 +120,20 @@ public class LeaseSet extends DataStructureImpl { /** * If true, we received this LeaseSet by a remote peer publishing it to * us, rather than by searching for it ourselves or locally creating it. - * + * Default false. */ public boolean getReceivedAsPublished() { return _receivedAsPublished; } + /** Default false */ public void setReceivedAsPublished(boolean received) { _receivedAsPublished = received; } + /** + * If true, we received this LeaseSet by searching for it + * Default false. + */ + public boolean getReceivedAsReply() { return _receivedAsReply; } + /** set to true */ + public void setReceivedAsReply() { _receivedAsReply = true; } + public void addLease(Lease lease) { if (lease == null) throw new IllegalArgumentException("erm, null lease"); if (lease.getGateway() == null) throw new IllegalArgumentException("erm, lease has no gateway");