Drop the old (and now unused!) redis-dispatch module

This commit is contained in:
Jon Chambers
2022-08-16 13:21:36 -04:00
committed by Jon Chambers
parent 11829d1f9f
commit fd5e9ea016
22 changed files with 23 additions and 1275 deletions

View File

@@ -6,11 +6,16 @@
package org.whispersystems.textsecuregcm.subscriptions;
import java.nio.charset.StandardCharsets;
import org.whispersystems.dispatch.util.Util;
public record ProcessorCustomer(String customerId, SubscriptionProcessor processor) {
public byte[] toDynamoBytes() {
return Util.combine(new byte[]{processor.getId()}, customerId.getBytes(StandardCharsets.UTF_8));
final byte[] customerIdBytes = customerId.getBytes(StandardCharsets.UTF_8);
final byte[] combinedBytes = new byte[customerIdBytes.length + 1];
combinedBytes[0] = processor.getId();
System.arraycopy(customerIdBytes, 0, combinedBytes, 1, customerIdBytes.length);
return combinedBytes;
}
}