Add comments, revert TTL change at AckMessage as it has no effect anyway

This commit is contained in:
chimp1984 2020-11-04 12:34:43 -05:00
parent b002c93d78
commit a1c84741f3
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3
2 changed files with 7 additions and 1 deletions

View File

@ -34,6 +34,10 @@ import lombok.extern.slf4j.Slf4j;
import javax.annotation.Nullable;
// TODO ExpirablePayload has no effect here as it is either a direct msg or packed into MailboxStoragePayload
// We could extend the TTL by setting the TTL in MailboxStoragePayload from the type of msg which gets into the
// SealedAndSigned data.
// We exclude uid from hashcode and equals to detect duplicate entries of the same AckMessage
@EqualsAndHashCode(callSuper = true, exclude = {"uid"})
@Value
@ -145,9 +149,10 @@ public final class AckMessage extends NetworkEnvelope implements MailboxMessage,
// API
///////////////////////////////////////////////////////////////////////////////////////////
//TODO has no effect, see comment at class definition
@Override
public long getTTL() {
return TimeUnit.DAYS.toMillis(2);
return TimeUnit.DAYS.toMillis(10);
}
@Override

View File

@ -47,6 +47,7 @@ import javax.annotation.Nullable;
* That is the typical requirement for a mailbox like system.
* <p/>
* Typical payloads are trade or dispute network_messages to be stored when the peer is offline.
* Size depends on payload but typical size is 2000-3000 bytes
*/
@Getter
@EqualsAndHashCode