Commit e2fc2cb1 authored by Karsten Loesing's avatar Karsten Loesing
Browse files

Make all descriptor instances serializable.

Implements #33090.
parent 81570c4d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@

package org.torproject.descriptor;

import java.io.Serializable;
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.List;
@@ -223,7 +224,7 @@ public interface BandwidthFile extends Descriptor {
   */
  List<RelayLine> relayLines();

  interface RelayLine {
  interface RelayLine extends Serializable {

    /**
     * Fingerprint for the relay's RSA identity key.
+2 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@

package org.torproject.descriptor;

import java.io.Serializable;
import java.util.SortedMap;

/**
@@ -14,7 +15,7 @@ import java.util.SortedMap;
 *
 * @since 1.0.0
 */
public interface BandwidthHistory {
public interface BandwidthHistory extends Serializable {

  /**
   * Return the original bandwidth history line as contained in the
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
package org.torproject.descriptor;

import java.io.File;
import java.io.Serializable;
import java.util.List;

/**
@@ -12,7 +13,7 @@ import java.util.List;
 *
 * @since 1.0.0
 */
public interface Descriptor {
public interface Descriptor extends Serializable {

  /**
   * Return the raw descriptor bytes.
+3 −1
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@

package org.torproject.descriptor;

import java.io.Serializable;

/**
 * Contains details about an authority and its vote that contributed to a
 * consensus.
@@ -13,7 +15,7 @@ package org.torproject.descriptor;
 *
 * @since 1.0.0
 */
public interface DirSourceEntry {
public interface DirSourceEntry extends Serializable {

  /**
   * Return the raw directory source entry bytes.
+3 −1
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@

package org.torproject.descriptor;

import java.io.Serializable;

/**
 * Contains the signature of a network status consensus or vote.
 *
@@ -13,7 +15,7 @@ package org.torproject.descriptor;
 *
 * @since 1.0.0
 */
public interface DirectorySignature {
public interface DirectorySignature extends Serializable {

  /**
   * Return the digest algorithm, which is "sha1" by default and which
Loading