summary refs log tree commit diff
path: root/synapse/federation/send_queue.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-04-07 11:52:57 +0100
committerErik Johnston <erik@matrix.org>2017-04-07 11:54:03 +0100
commita828a64b754322f8a1483ec5256ab925039a6e39 (patch)
treec5db57a25cc3df4f36ac66b1c55c5f667e716ba2 /synapse/federation/send_queue.py
parentAdd logging (diff)
downloadsynapse-a828a64b754322f8a1483ec5256ab925039a6e39.tar.xz
Comment
Diffstat (limited to '')
-rw-r--r--synapse/federation/send_queue.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/synapse/federation/send_queue.py b/synapse/federation/send_queue.py
index 867cba0cf1..c26da7acf8 100644
--- a/synapse/federation/send_queue.py
+++ b/synapse/federation/send_queue.py
@@ -312,16 +312,29 @@ class FederationRemoteSendQueue(object):
 
 
 class BaseFederationRow(object):
-    TypeId = None
+    """Base class for rows to be sent in the federation stream.
+
+    Specifies how to identify, serialize and deserialize the different types.
+    """
+
+    TypeId = None  # Unique string that ids the type. Must be overriden in sub classes.
 
     @staticmethod
     def from_data(data):
         """Parse the data from the federation stream into a row.
+
+        Args:
+            data: The value of ``data`` from FederationStreamRow.data, type
+                depends on the type of stream
         """
         raise NotImplementedError()
 
     def to_data(self):
-        """Serialize this row to be sent over the federation stream
+        """Serialize this row to be sent over the federation stream.
+
+        Returns:
+            The value to be sent in FederationStreamRow.data. The type depends
+            on the type of stream.
         """
         raise NotImplementedError()