james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trần Tiến Đức (JIRA) <j...@apache.org>
Subject [jira] [Updated] (MAILBOX-379) PreDeletionHooks - design + plug
Date Tue, 19 Feb 2019 10:33:00 GMT

     [ https://issues.apache.org/jira/browse/MAILBOX-379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Trần Tiến Đức updated MAILBOX-379:
----------------------------------
    Description: 
PreDeletionHook is an *extension endpoint* that is run before a deletion actually happens.
It can thus read data that will be deleted and save it for later processing.
 - First create a `DeletionId` - unique identifier for a deletion operation.

This Id allows correlating PreDeletionHooks with MailboxListener.
 - Define the PredeletionHook API

 

 
{code:java}
interface PreDeletionHook { 
    Publisher<Void> notifyDelete(DeletionOparation); 
}

class DeletionOperation { 
    private final DeletionId; 
    private final List<MetadataWithMailboxId> 
}
{code}
 - Inject a `Set<PreDeletionHook>` in the `StoreMessageManager` & `StoreMessageIdManager`

 - Call PreDeletionHooks before 'delete' operation. You will add unit tests in `MailboxManagerTest`
& `MessageIdManagerTest` about this.

  was:
PreDeletionHook is an *extension endpoint* that is run before a deletion actually happens.
It can thus read data that will be deleted and save it for later processing.

- First create a `DeletionId` - unique identifier for a deletion operation.

This Id allows correlating PreDeletionHooks with MailboxListener.

- Define the PredeletionHook API

```
interface PreDeletionHook {
 Publisher<Void> notifyDelete(DeletionOparation);
}

class DeletionOperation {
 private final DeletionId;
 private final List<MetadataWithMailboxId>
}
```

- Inject a `Set<PreDeletionHook>` in the `StoreMessageManager` & `StoreMessageIdManager`

- Call PreDeletionHooks before 'delete' operation. You will add unit tests in `MailboxManagerTest`
& `MessageIdManagerTest` about this.


> PreDeletionHooks - design + plug
> --------------------------------
>
>                 Key: MAILBOX-379
>                 URL: https://issues.apache.org/jira/browse/MAILBOX-379
>             Project: James Mailbox
>          Issue Type: Bug
>            Reporter: Trần Tiến Đức
>            Priority: Major
>
> PreDeletionHook is an *extension endpoint* that is run before a deletion actually happens.
It can thus read data that will be deleted and save it for later processing.
>  - First create a `DeletionId` - unique identifier for a deletion operation.
> This Id allows correlating PreDeletionHooks with MailboxListener.
>  - Define the PredeletionHook API
>  
>  
> {code:java}
> interface PreDeletionHook { 
>     Publisher<Void> notifyDelete(DeletionOparation); 
> }
> class DeletionOperation { 
>     private final DeletionId; 
>     private final List<MetadataWithMailboxId> 
> }
> {code}
>  - Inject a `Set<PreDeletionHook>` in the `StoreMessageManager` & `StoreMessageIdManager`
>  - Call PreDeletionHooks before 'delete' operation. You will add unit tests in `MailboxManagerTest`
& `MessageIdManagerTest` about this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message