mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Replace MessagesCleanedUpEvent with ConversationMessagesDeletedEvent
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package org.briarproject.bramble.api.cleanup;
|
||||
|
||||
import org.briarproject.bramble.api.cleanup.event.MessagesCleanedUpEvent;
|
||||
import org.briarproject.bramble.api.db.DatabaseComponent;
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.db.Transaction;
|
||||
@@ -19,8 +18,6 @@ public interface CleanupHook {
|
||||
|
||||
/**
|
||||
* Called when the cleanup deadlines of one or more messages are reached.
|
||||
* When this method returns, a {@link MessagesCleanedUpEvent} will be
|
||||
* broadcast.
|
||||
* <p>
|
||||
* The callee is not required to delete the messages, but the hook won't be
|
||||
* called again for these messages unless another cleanup timer is set (see
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
package org.briarproject.bramble.api.cleanup.event;
|
||||
|
||||
import org.briarproject.bramble.api.event.Event;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.sync.GroupId;
|
||||
import org.briarproject.bramble.api.sync.MessageId;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.annotation.concurrent.Immutable;
|
||||
|
||||
/**
|
||||
* An event that is broadcast when one or more messages in a group are
|
||||
* cleaned up.
|
||||
*/
|
||||
@Immutable
|
||||
@NotNullByDefault
|
||||
public class MessagesCleanedUpEvent extends Event {
|
||||
|
||||
private final GroupId groupId;
|
||||
private final Collection<MessageId> messageIds;
|
||||
|
||||
public MessagesCleanedUpEvent(GroupId groupId,
|
||||
Collection<MessageId> messageIds) {
|
||||
this.groupId = groupId;
|
||||
this.messageIds = messageIds;
|
||||
}
|
||||
|
||||
public GroupId getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
public Collection<MessageId> getMessageIds() {
|
||||
return messageIds;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user