remove unnecessaary initializers from constructors
This commit is contained in:
@ -9,8 +9,6 @@ public class Address extends DataStructureImpl {
|
|||||||
private Destination _destination;
|
private Destination _destination;
|
||||||
|
|
||||||
public Address() {
|
public Address() {
|
||||||
_hostname = null;
|
|
||||||
_destination = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getHostname() {
|
public String getHostname() {
|
||||||
|
@ -22,11 +22,9 @@ public class ByteArray implements Serializable, Comparable {
|
|||||||
private int _offset;
|
private int _offset;
|
||||||
|
|
||||||
public ByteArray() {
|
public ByteArray() {
|
||||||
this(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ByteArray(byte[] data) {
|
public ByteArray(byte[] data) {
|
||||||
_offset = 0;
|
|
||||||
_data = data;
|
_data = data;
|
||||||
_valid = (data != null ? data.length : 0);
|
_valid = (data != null ? data.length : 0);
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,6 @@ public class Certificate extends DataStructureImpl {
|
|||||||
public final static int CERTIFICATE_TYPE_MULTIPLE = 4;
|
public final static int CERTIFICATE_TYPE_MULTIPLE = 4;
|
||||||
|
|
||||||
public Certificate() {
|
public Certificate() {
|
||||||
_type = 0;
|
|
||||||
_payload = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Certificate(int type, byte[] payload) {
|
public Certificate(int type, byte[] payload) {
|
||||||
|
@ -27,10 +27,6 @@ public class Destination extends DataStructureImpl {
|
|||||||
protected Hash __calculatedHash;
|
protected Hash __calculatedHash;
|
||||||
|
|
||||||
public Destination() {
|
public Destination() {
|
||||||
setCertificate(null);
|
|
||||||
setSigningPublicKey(null);
|
|
||||||
setPublicKey(null);
|
|
||||||
__calculatedHash = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,7 +34,6 @@ public class Destination extends DataStructureImpl {
|
|||||||
* @param s a Base64 representation of the destination, as (eg) is used in hosts.txt
|
* @param s a Base64 representation of the destination, as (eg) is used in hosts.txt
|
||||||
*/
|
*/
|
||||||
public Destination(String s) throws DataFormatException {
|
public Destination(String s) throws DataFormatException {
|
||||||
this();
|
|
||||||
fromBase64(s);
|
fromBase64(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ public class Hash extends DataStructureImpl {
|
|||||||
public final static Hash FAKE_HASH = new Hash(new byte[HASH_LENGTH]);
|
public final static Hash FAKE_HASH = new Hash(new byte[HASH_LENGTH]);
|
||||||
|
|
||||||
public Hash() {
|
public Hash() {
|
||||||
setData(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Hash(byte data[]) {
|
public Hash(byte data[]) {
|
||||||
|
@ -30,11 +30,6 @@ public class Lease extends DataStructureImpl {
|
|||||||
private int _numFailure;
|
private int _numFailure;
|
||||||
|
|
||||||
public Lease() {
|
public Lease() {
|
||||||
setGateway(null);
|
|
||||||
setTunnelId(null);
|
|
||||||
setEndDate(null);
|
|
||||||
setNumSuccess(0);
|
|
||||||
setNumFailure(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Retrieve the router at which the destination can be contacted
|
/** Retrieve the router at which the destination can be contacted
|
||||||
|
@ -78,18 +78,8 @@ public class LeaseSet extends DataStructureImpl {
|
|||||||
public final static int MAX_LEASES = 6;
|
public final static int MAX_LEASES = 6;
|
||||||
|
|
||||||
public LeaseSet() {
|
public LeaseSet() {
|
||||||
setDestination(null);
|
|
||||||
setEncryptionKey(null);
|
|
||||||
setSigningKey(null);
|
|
||||||
setSignature(null);
|
|
||||||
setRoutingKey(null);
|
|
||||||
_leases = new ArrayList(MAX_LEASES);
|
_leases = new ArrayList(MAX_LEASES);
|
||||||
_routingKeyGenMod = null;
|
|
||||||
_receivedAsPublished = false;
|
|
||||||
_firstExpiration = Long.MAX_VALUE;
|
_firstExpiration = Long.MAX_VALUE;
|
||||||
_lastExpiration = 0;
|
|
||||||
_decrypted = false;
|
|
||||||
_checked = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Destination getDestination() {
|
public Destination getDestination() {
|
||||||
|
@ -27,8 +27,6 @@ public class Payload extends DataStructureImpl {
|
|||||||
private byte[] _unencryptedData;
|
private byte[] _unencryptedData;
|
||||||
|
|
||||||
public Payload() {
|
public Payload() {
|
||||||
setUnencryptedData(null);
|
|
||||||
setEncryptedData(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -28,8 +28,8 @@ public class PrivateKey extends DataStructureImpl {
|
|||||||
public final static int KEYSIZE_BYTES = 256;
|
public final static int KEYSIZE_BYTES = 256;
|
||||||
|
|
||||||
public PrivateKey() {
|
public PrivateKey() {
|
||||||
setData(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrivateKey(byte data[]) { setData(data); }
|
public PrivateKey(byte data[]) { setData(data); }
|
||||||
|
|
||||||
/** constructs from base64
|
/** constructs from base64
|
||||||
@ -37,7 +37,6 @@ public class PrivateKey extends DataStructureImpl {
|
|||||||
* on a prior instance of PrivateKey
|
* on a prior instance of PrivateKey
|
||||||
*/
|
*/
|
||||||
public PrivateKey(String base64Data) throws DataFormatException {
|
public PrivateKey(String base64Data) throws DataFormatException {
|
||||||
this();
|
|
||||||
fromBase64(base64Data);
|
fromBase64(base64Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ public class PublicKey extends DataStructureImpl {
|
|||||||
public final static int KEYSIZE_BYTES = 256;
|
public final static int KEYSIZE_BYTES = 256;
|
||||||
|
|
||||||
public PublicKey() {
|
public PublicKey() {
|
||||||
setData(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public PublicKey(byte data[]) {
|
public PublicKey(byte data[]) {
|
||||||
if ( (data == null) || (data.length != KEYSIZE_BYTES) )
|
if ( (data == null) || (data.length != KEYSIZE_BYTES) )
|
||||||
throw new IllegalArgumentException("Data must be specified, and the correct size");
|
throw new IllegalArgumentException("Data must be specified, and the correct size");
|
||||||
@ -39,7 +39,6 @@ public class PublicKey extends DataStructureImpl {
|
|||||||
* on a prior instance of PublicKey
|
* on a prior instance of PublicKey
|
||||||
*/
|
*/
|
||||||
public PublicKey(String base64Data) throws DataFormatException {
|
public PublicKey(String base64Data) throws DataFormatException {
|
||||||
this();
|
|
||||||
fromBase64(base64Data);
|
fromBase64(base64Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,9 +29,6 @@ public class RouterAddress extends DataStructureImpl {
|
|||||||
|
|
||||||
public RouterAddress() {
|
public RouterAddress() {
|
||||||
setCost(-1);
|
setCost(-1);
|
||||||
setExpiration(null);
|
|
||||||
setTransportStyle(null);
|
|
||||||
setOptions(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,10 +31,6 @@ public class RouterIdentity extends DataStructureImpl {
|
|||||||
private Hash __calculatedHash;
|
private Hash __calculatedHash;
|
||||||
|
|
||||||
public RouterIdentity() {
|
public RouterIdentity() {
|
||||||
setCertificate(null);
|
|
||||||
setSigningPublicKey(null);
|
|
||||||
setPublicKey(null);
|
|
||||||
__calculatedHash = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Certificate getCertificate() {
|
public Certificate getCertificate() {
|
||||||
|
@ -60,18 +60,9 @@ public class RouterInfo extends DataStructureImpl {
|
|||||||
public static final String BW_CAPABILITY_CHARS = "KLMNO";
|
public static final String BW_CAPABILITY_CHARS = "KLMNO";
|
||||||
|
|
||||||
public RouterInfo() {
|
public RouterInfo() {
|
||||||
setIdentity(null);
|
|
||||||
setPublished(0);
|
|
||||||
_addresses = new HashSet(2);
|
_addresses = new HashSet(2);
|
||||||
_peers = new HashSet(0);
|
_peers = new HashSet(0);
|
||||||
_options = new OrderedProperties();
|
_options = new OrderedProperties();
|
||||||
setSignature(null);
|
|
||||||
_validated = false;
|
|
||||||
_isValid = false;
|
|
||||||
_currentRoutingKey = null;
|
|
||||||
_stringified = null;
|
|
||||||
_byteified = null;
|
|
||||||
_hashCodeInitialized = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public RouterInfo(RouterInfo old) {
|
public RouterInfo(RouterInfo old) {
|
||||||
|
@ -27,8 +27,8 @@ public class SessionKey extends DataStructureImpl {
|
|||||||
public static final SessionKey INVALID_KEY = new SessionKey(new byte[KEYSIZE_BYTES]);
|
public static final SessionKey INVALID_KEY = new SessionKey(new byte[KEYSIZE_BYTES]);
|
||||||
|
|
||||||
public SessionKey() {
|
public SessionKey() {
|
||||||
this(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SessionKey(byte data[]) {
|
public SessionKey(byte data[]) {
|
||||||
setData(data);
|
setData(data);
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,8 @@ public class Signature extends DataStructureImpl {
|
|||||||
FAKE_SIGNATURE[i] = 0x00;
|
FAKE_SIGNATURE[i] = 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Signature() { this(null); }
|
public Signature() {}
|
||||||
|
|
||||||
public Signature(byte data[]) { setData(data); }
|
public Signature(byte data[]) { setData(data); }
|
||||||
|
|
||||||
public byte[] getData() {
|
public byte[] getData() {
|
||||||
|
@ -28,7 +28,8 @@ public class SigningPrivateKey extends DataStructureImpl {
|
|||||||
|
|
||||||
public final static int KEYSIZE_BYTES = 20;
|
public final static int KEYSIZE_BYTES = 20;
|
||||||
|
|
||||||
public SigningPrivateKey() { this((byte[])null); }
|
public SigningPrivateKey() {}
|
||||||
|
|
||||||
public SigningPrivateKey(byte data[]) { setData(data); }
|
public SigningPrivateKey(byte data[]) { setData(data); }
|
||||||
|
|
||||||
/** constructs from base64
|
/** constructs from base64
|
||||||
@ -36,7 +37,6 @@ public class SigningPrivateKey extends DataStructureImpl {
|
|||||||
* on a prior instance of SigningPrivateKey
|
* on a prior instance of SigningPrivateKey
|
||||||
*/
|
*/
|
||||||
public SigningPrivateKey(String base64Data) throws DataFormatException {
|
public SigningPrivateKey(String base64Data) throws DataFormatException {
|
||||||
this();
|
|
||||||
fromBase64(base64Data);
|
fromBase64(base64Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,8 @@ public class SigningPublicKey extends DataStructureImpl {
|
|||||||
|
|
||||||
public final static int KEYSIZE_BYTES = 128;
|
public final static int KEYSIZE_BYTES = 128;
|
||||||
|
|
||||||
public SigningPublicKey() { this((byte[])null); }
|
public SigningPublicKey() {}
|
||||||
|
|
||||||
public SigningPublicKey(byte data[]) { setData(data); }
|
public SigningPublicKey(byte data[]) { setData(data); }
|
||||||
|
|
||||||
/** constructs from base64
|
/** constructs from base64
|
||||||
@ -34,7 +35,6 @@ public class SigningPublicKey extends DataStructureImpl {
|
|||||||
* on a prior instance of SigningPublicKey
|
* on a prior instance of SigningPublicKey
|
||||||
*/
|
*/
|
||||||
public SigningPublicKey(String base64Data) throws DataFormatException {
|
public SigningPublicKey(String base64Data) throws DataFormatException {
|
||||||
this();
|
|
||||||
fromBase64(base64Data);
|
fromBase64(base64Data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@ public class AbuseReason extends DataStructureImpl {
|
|||||||
private String _reason;
|
private String _reason;
|
||||||
|
|
||||||
public AbuseReason() {
|
public AbuseReason() {
|
||||||
setReason(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getReason() {
|
public String getReason() {
|
||||||
|
@ -33,10 +33,6 @@ public class CreateLeaseSetMessage extends I2CPMessageImpl {
|
|||||||
private PrivateKey _privateKey;
|
private PrivateKey _privateKey;
|
||||||
|
|
||||||
public CreateLeaseSetMessage() {
|
public CreateLeaseSetMessage() {
|
||||||
setSessionId(null);
|
|
||||||
setLeaseSet(null);
|
|
||||||
setSigningPrivateKey(null);
|
|
||||||
setPrivateKey(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SessionId getSessionId() {
|
public SessionId getSessionId() {
|
||||||
|
@ -27,7 +27,6 @@ public class DestroySessionMessage extends I2CPMessageImpl {
|
|||||||
private SessionId _sessionId;
|
private SessionId _sessionId;
|
||||||
|
|
||||||
public DestroySessionMessage() {
|
public DestroySessionMessage() {
|
||||||
setSessionId(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SessionId getSessionId() {
|
public SessionId getSessionId() {
|
||||||
|
@ -27,7 +27,6 @@ public class DisconnectMessage extends I2CPMessageImpl {
|
|||||||
private String _reason;
|
private String _reason;
|
||||||
|
|
||||||
public DisconnectMessage() {
|
public DisconnectMessage() {
|
||||||
setReason(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getReason() {
|
public String getReason() {
|
||||||
|
@ -31,7 +31,6 @@ public class MessagePayloadMessage extends I2CPMessageImpl {
|
|||||||
public MessagePayloadMessage() {
|
public MessagePayloadMessage() {
|
||||||
setSessionId(-1);
|
setSessionId(-1);
|
||||||
setMessageId(-1);
|
setMessageId(-1);
|
||||||
setPayload(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getSessionId() {
|
public long getSessionId() {
|
||||||
|
@ -28,8 +28,6 @@ public class ReconfigureSessionMessage extends I2CPMessageImpl {
|
|||||||
private SessionConfig _sessionConfig;
|
private SessionConfig _sessionConfig;
|
||||||
|
|
||||||
public ReconfigureSessionMessage() {
|
public ReconfigureSessionMessage() {
|
||||||
_sessionId = null;
|
|
||||||
_sessionConfig = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SessionId getSessionId() {
|
public SessionId getSessionId() {
|
||||||
|
@ -30,10 +30,6 @@ public class ReportAbuseMessage extends I2CPMessageImpl {
|
|||||||
private MessageId _messageId;
|
private MessageId _messageId;
|
||||||
|
|
||||||
public ReportAbuseMessage() {
|
public ReportAbuseMessage() {
|
||||||
setSessionId(null);
|
|
||||||
setSeverity(null);
|
|
||||||
setReason(null);
|
|
||||||
setMessageId(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SessionId getSessionId() {
|
public SessionId getSessionId() {
|
||||||
|
@ -34,9 +34,7 @@ public class RequestLeaseSetMessage extends I2CPMessageImpl {
|
|||||||
private Date _end;
|
private Date _end;
|
||||||
|
|
||||||
public RequestLeaseSetMessage() {
|
public RequestLeaseSetMessage() {
|
||||||
setSessionId(null);
|
|
||||||
_endpoints = new ArrayList();
|
_endpoints = new ArrayList();
|
||||||
setEndDate(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SessionId getSessionId() {
|
public SessionId getSessionId() {
|
||||||
|
@ -34,7 +34,6 @@ public class SendMessageExpiresMessage extends SendMessageMessage {
|
|||||||
|
|
||||||
public SendMessageExpiresMessage() {
|
public SendMessageExpiresMessage() {
|
||||||
super();
|
super();
|
||||||
setExpiration(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getExpiration() {
|
public Date getExpiration() {
|
||||||
|
@ -32,10 +32,6 @@ public class SendMessageMessage extends I2CPMessageImpl {
|
|||||||
private long _nonce;
|
private long _nonce;
|
||||||
|
|
||||||
public SendMessageMessage() {
|
public SendMessageMessage() {
|
||||||
setSessionId(null);
|
|
||||||
setDestination(null);
|
|
||||||
setPayload(null);
|
|
||||||
setNonce(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SessionId getSessionId() {
|
public SessionId getSessionId() {
|
||||||
|
@ -51,9 +51,7 @@ public class SessionConfig extends DataStructureImpl {
|
|||||||
}
|
}
|
||||||
public SessionConfig(Destination dest) {
|
public SessionConfig(Destination dest) {
|
||||||
_destination = dest;
|
_destination = dest;
|
||||||
_signature = null;
|
|
||||||
_creationDate = new Date(Clock.getInstance().now());
|
_creationDate = new Date(Clock.getInstance().now());
|
||||||
_options = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +33,6 @@ public class SessionStatusMessage extends I2CPMessageImpl {
|
|||||||
public final static int STATUS_INVALID = 3;
|
public final static int STATUS_INVALID = 3;
|
||||||
|
|
||||||
public SessionStatusMessage() {
|
public SessionStatusMessage() {
|
||||||
setSessionId(null);
|
|
||||||
setStatus(STATUS_INVALID);
|
setStatus(STATUS_INVALID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,9 +15,6 @@ public class Frequency {
|
|||||||
|
|
||||||
public Frequency(long period) {
|
public Frequency(long period) {
|
||||||
setPeriod(period);
|
setPeriod(period);
|
||||||
setLastEvent(0);
|
|
||||||
setAverageInterval(0);
|
|
||||||
setMinAverageInterval(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** how long is this frequency averaged over? */
|
/** how long is this frequency averaged over? */
|
||||||
|
@ -120,18 +120,6 @@ public class Rate {
|
|||||||
*/
|
*/
|
||||||
public Rate(long period) throws IllegalArgumentException {
|
public Rate(long period) throws IllegalArgumentException {
|
||||||
if (period <= 0) throw new IllegalArgumentException("The period must be strictly positive");
|
if (period <= 0) throw new IllegalArgumentException("The period must be strictly positive");
|
||||||
_currentTotalValue = 0.0d;
|
|
||||||
_currentEventCount = 0;
|
|
||||||
_currentTotalEventTime = 0;
|
|
||||||
_lastTotalValue = 0.0d;
|
|
||||||
_lastEventCount = 0;
|
|
||||||
_lastTotalEventTime = 0;
|
|
||||||
_extremeTotalValue = 0.0d;
|
|
||||||
_extremeEventCount = 0;
|
|
||||||
_extremeTotalEventTime = 0;
|
|
||||||
_lifetimeTotalValue = 0.0d;
|
|
||||||
_lifetimeEventCount = 0;
|
|
||||||
_lifetimeTotalEventTime = 0;
|
|
||||||
|
|
||||||
_creationDate = now();
|
_creationDate = now();
|
||||||
_lastCoalesceDate = _creationDate;
|
_lastCoalesceDate = _creationDate;
|
||||||
|
@ -24,7 +24,6 @@ public class DataMessage extends I2NPMessageImpl {
|
|||||||
|
|
||||||
public DataMessage(I2PAppContext context) {
|
public DataMessage(I2PAppContext context) {
|
||||||
super(context);
|
super(context);
|
||||||
_data = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getData() {
|
public byte[] getData() {
|
||||||
|
@ -34,9 +34,7 @@ public class DatabaseSearchReplyMessage extends I2NPMessageImpl {
|
|||||||
// do this in netdb if we need it
|
// do this in netdb if we need it
|
||||||
//_context.statManager().createRateStat("netDb.searchReplyMessageSend", "How many search reply messages we send", "NetworkDatabase", new long[] { 60*1000, 5*60*1000, 10*60*1000, 60*60*1000 });
|
//_context.statManager().createRateStat("netDb.searchReplyMessageSend", "How many search reply messages we send", "NetworkDatabase", new long[] { 60*1000, 5*60*1000, 10*60*1000, 60*60*1000 });
|
||||||
//_context.statManager().createRateStat("netDb.searchReplyMessageReceive", "How many search reply messages we receive", "NetworkDatabase", new long[] { 60*1000, 5*60*1000, 10*60*1000, 60*60*1000 });
|
//_context.statManager().createRateStat("netDb.searchReplyMessageReceive", "How many search reply messages we receive", "NetworkDatabase", new long[] { 60*1000, 5*60*1000, 10*60*1000, 60*60*1000 });
|
||||||
setSearchKey(null);
|
|
||||||
_peerHashes = new ArrayList(3);
|
_peerHashes = new ArrayList(3);
|
||||||
setFromHash(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,12 +43,6 @@ public class DatabaseStoreMessage extends I2NPMessageImpl {
|
|||||||
public DatabaseStoreMessage(I2PAppContext context) {
|
public DatabaseStoreMessage(I2PAppContext context) {
|
||||||
super(context);
|
super(context);
|
||||||
setValueType(-1);
|
setValueType(-1);
|
||||||
setKey(null);
|
|
||||||
setLeaseSet(null);
|
|
||||||
setRouterInfo(null);
|
|
||||||
setReplyToken(0);
|
|
||||||
setReplyTunnel(null);
|
|
||||||
setReplyGateway(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,14 +51,7 @@ public class DeliveryInstructions extends DataStructureImpl {
|
|||||||
private final static long FLAG_DELAY = 16;
|
private final static long FLAG_DELAY = 16;
|
||||||
|
|
||||||
public DeliveryInstructions() {
|
public DeliveryInstructions() {
|
||||||
setEncrypted(false);
|
|
||||||
setEncryptionKey(null);
|
|
||||||
setDeliveryMode(-1);
|
setDeliveryMode(-1);
|
||||||
setDestination(null);
|
|
||||||
setRouter(null);
|
|
||||||
setTunnelId(null);
|
|
||||||
setDelayRequested(false);
|
|
||||||
setDelaySeconds(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getEncrypted() { return _encrypted; }
|
public boolean getEncrypted() { return _encrypted; }
|
||||||
|
@ -40,11 +40,7 @@ public class GarlicClove extends DataStructureImpl {
|
|||||||
_context = context;
|
_context = context;
|
||||||
_log = context.logManager().getLog(GarlicClove.class);
|
_log = context.logManager().getLog(GarlicClove.class);
|
||||||
_handler = new I2NPMessageHandler(context);
|
_handler = new I2NPMessageHandler(context);
|
||||||
setInstructions(null);
|
|
||||||
setData(null);
|
|
||||||
setCloveId(-1);
|
setCloveId(-1);
|
||||||
setExpiration(null);
|
|
||||||
setCertificate(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeliveryInstructions getInstructions() { return _instructions; }
|
public DeliveryInstructions getInstructions() { return _instructions; }
|
||||||
|
@ -26,7 +26,6 @@ public class GarlicMessage extends I2NPMessageImpl {
|
|||||||
|
|
||||||
public GarlicMessage(I2PAppContext context) {
|
public GarlicMessage(I2PAppContext context) {
|
||||||
super(context);
|
super(context);
|
||||||
setData(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getData() {
|
public byte[] getData() {
|
||||||
|
@ -33,7 +33,6 @@ public class I2NPMessageHandler {
|
|||||||
public I2NPMessageHandler(I2PAppContext context) {
|
public I2NPMessageHandler(I2PAppContext context) {
|
||||||
_context = context;
|
_context = context;
|
||||||
_log = context.logManager().getLog(I2NPMessageHandler.class);
|
_log = context.logManager().getLog(I2NPMessageHandler.class);
|
||||||
_messageBuffer = null;
|
|
||||||
_lastSize = -1;
|
_lastSize = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +54,6 @@ public abstract class I2NPMessageImpl extends DataStructureImpl implements I2NPM
|
|||||||
_log = context.logManager().getLog(I2NPMessageImpl.class);
|
_log = context.logManager().getLog(I2NPMessageImpl.class);
|
||||||
_expiration = _context.clock().now() + DEFAULT_EXPIRATION_MS;
|
_expiration = _context.clock().now() + DEFAULT_EXPIRATION_MS;
|
||||||
_uniqueId = _context.random().nextLong(MAX_ID_VALUE);
|
_uniqueId = _context.random().nextLong(MAX_ID_VALUE);
|
||||||
_written = false;
|
|
||||||
_read = false;
|
|
||||||
//_context.statManager().createRateStat("i2np.writeTime", "How long it takes to write an I2NP message", "I2NP", new long[] { 10*60*1000, 60*60*1000 });
|
//_context.statManager().createRateStat("i2np.writeTime", "How long it takes to write an I2NP message", "I2NP", new long[] { 10*60*1000, 60*60*1000 });
|
||||||
//_context.statManager().createRateStat("i2np.readTime", "How long it takes to read an I2NP message", "I2NP", new long[] { 10*60*1000, 60*60*1000 });
|
//_context.statManager().createRateStat("i2np.readTime", "How long it takes to read an I2NP message", "I2NP", new long[] { 10*60*1000, 60*60*1000 });
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,6 @@ public abstract class JobImpl implements Job {
|
|||||||
_context = context;
|
_context = context;
|
||||||
_timing = new JobTiming(context);
|
_timing = new JobTiming(context);
|
||||||
_id = ++_idSrc;
|
_id = ++_idSrc;
|
||||||
_addedBy = null;
|
|
||||||
_madeReadyOn = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getJobId() { return _id; }
|
public long getJobId() { return _id; }
|
||||||
|
@ -15,11 +15,8 @@ class JobStats {
|
|||||||
|
|
||||||
public JobStats(String name) {
|
public JobStats(String name) {
|
||||||
_job = name;
|
_job = name;
|
||||||
_numRuns = 0;
|
|
||||||
_totalTime = 0;
|
|
||||||
_maxTime = -1;
|
_maxTime = -1;
|
||||||
_minTime = -1;
|
_minTime = -1;
|
||||||
_totalPendingTime = 0;
|
|
||||||
_maxPendingTime = -1;
|
_maxPendingTime = -1;
|
||||||
_minPendingTime = -1;
|
_minPendingTime = -1;
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,6 @@ public class JobTiming implements Clock.ClockUpdateListener {
|
|||||||
public JobTiming(RouterContext context) {
|
public JobTiming(RouterContext context) {
|
||||||
_context = context;
|
_context = context;
|
||||||
_start = context.clock().now();
|
_start = context.clock().now();
|
||||||
_actualStart = 0;
|
|
||||||
_actualEnd = 0;
|
|
||||||
//context.clock().addUpdateListener(this);
|
//context.clock().addUpdateListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,18 +66,8 @@ public class OutNetMessage {
|
|||||||
public OutNetMessage(RouterContext context) {
|
public OutNetMessage(RouterContext context) {
|
||||||
_context = context;
|
_context = context;
|
||||||
_log = context.logManager().getLog(OutNetMessage.class);
|
_log = context.logManager().getLog(OutNetMessage.class);
|
||||||
setTarget(null);
|
|
||||||
_message = null;
|
|
||||||
_messageSize = 0;
|
|
||||||
setPriority(-1);
|
setPriority(-1);
|
||||||
setExpiration(-1);
|
setExpiration(-1);
|
||||||
setOnSendJob(null);
|
|
||||||
setOnFailedSendJob(null);
|
|
||||||
setOnReplyJob(null);
|
|
||||||
setOnFailedReplyJob(null);
|
|
||||||
setReplySelector(null);
|
|
||||||
_failedTransports = null;
|
|
||||||
_sendBegin = 0;
|
|
||||||
//_createdBy = new Exception("Created by");
|
//_createdBy = new Exception("Created by");
|
||||||
_created = context.clock().now();
|
_created = context.clock().now();
|
||||||
timestamp("Created");
|
timestamp("Created");
|
||||||
|
@ -60,12 +60,7 @@ public class TunnelPoolSettings {
|
|||||||
_duration = DEFAULT_DURATION;
|
_duration = DEFAULT_DURATION;
|
||||||
_length = DEFAULT_LENGTH;
|
_length = DEFAULT_LENGTH;
|
||||||
_lengthVariance = DEFAULT_LENGTH_VARIANCE;
|
_lengthVariance = DEFAULT_LENGTH_VARIANCE;
|
||||||
_lengthOverride = 0;
|
|
||||||
_allowZeroHop = DEFAULT_ALLOW_ZERO_HOP;
|
_allowZeroHop = DEFAULT_ALLOW_ZERO_HOP;
|
||||||
_isInbound = false;
|
|
||||||
_isExploratory = false;
|
|
||||||
_destination = null;
|
|
||||||
_destinationNickname = null;
|
|
||||||
_IPRestriction = DEFAULT_IP_RESTRICTION;
|
_IPRestriction = DEFAULT_IP_RESTRICTION;
|
||||||
_unknownOptions = new Properties();
|
_unknownOptions = new Properties();
|
||||||
_randomKey = generateRandomKey();
|
_randomKey = generateRandomKey();
|
||||||
|
Reference in New Issue
Block a user