Class MemberDeleteManager


  • public class MemberDeleteManager
    extends java.lang.Object
    Manager handling asynchronous Member deletion request.
    Since:
    10.0.7 / JCMS-9292
    • Method Detail

      • isAsyncDeleteEnabled

        public boolean isAsyncDeleteEnabled()
        Checks if asynchronous deletion of Member is enabled.

        Property :
        member.async-delete.enabled: true

        Returns:
        true if enabled, false otherwise
      • getAsyncDeleteMaxTimeout

        public long getAsyncDeleteMaxTimeout()
        Retrieve the timeout (in milliseconds) to use when waiting for async request in "legacy" synchronous code.

        Default is 0, to wait forever.

        Property :
        member.async-delete.timeout: 0

        Returns:
        a duration in milliseconds
      • hasPendingDeletions

        public boolean hasPendingDeletions()
        Check if there are any pending
        Returns:
        true if there are member pending deletion, false otherwise
      • hasPendingDeletion

        public boolean hasPendingDeletion​(Member member)
        Check a deletion of the specified member has been requested
        Parameters:
        member - a Member
        Returns:
        true if member is schedule for deletion, false otherwise
      • requestMemberDeletion

        public java.util.concurrent.CompletableFuture<java.lang.Void> requestMemberDeletion​(Member opAuthor,
                                                                                            Member memberToDelete,
                                                                                            java.util.Map<java.lang.String,​?> contextMap)
        Request a deletion of memberToDelete by opAuthor.
        Parameters:
        opAuthor - the member performing the deletion
        memberToDelete - the member to delete, must not be null
        Returns:
        a CompletableFuture (never return null, return an already completed future if specified memberToDelete is null)