Interface IMPCManager

All Known Implementing Classes:
MPCManager, MPCManagerInMemory

public interface IMPCManager
Interface for an MPC (Message Partition Channel) manager
Since:
0.9.6
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if an MPC with the specified ID is contained.
    void
    createMPC(MPC aMPC)
    Create a new MPC.
    com.helger.commons.state.EChange
    deleteMPC(String sMPCID)
    Delete the MPC with the provided ID.
    Get the MPC with the specified ID.
    default IMPC
    Get the MPC with the specified ID, or the default MPC.
    com.helger.commons.state.EChange
    Mark the MPC with the provided ID as deleted.
    com.helger.commons.state.EChange
    Update an existing MPC
  • Method Details

    • createMPC

      void createMPC(@Nonnull MPC aMPC)
      Create a new MPC.
      Parameters:
      aMPC - The MPC to be added. May not be null.
    • updateMPC

      @Nonnull com.helger.commons.state.EChange updateMPC(@Nonnull IMPC aMPC)
      Update an existing MPC
      Parameters:
      aMPC - The MPC to be updated. May not be null.
      Returns:
      EChange.CHANGED if something changed, EChange.UNCHANGED otherwise.
    • markMPCDeleted

      @Nonnull com.helger.commons.state.EChange markMPCDeleted(@Nullable String sMPCID)
      Mark the MPC with the provided ID as deleted.
      Parameters:
      sMPCID - The ID of the MPC to be marked as deleted. May be null.
      Returns:
      EChange.CHANGED if marking as deleted succeeded, EChange.UNCHANGED otherwise.
    • deleteMPC

      @Nonnull com.helger.commons.state.EChange deleteMPC(@Nullable String sMPCID)
      Delete the MPC with the provided ID.
      Parameters:
      sMPCID - The ID of the MPC to be deleted. May be null.
      Returns:
      EChange.CHANGED if deleting succeeded, EChange.UNCHANGED otherwise.
    • getMPCOfID

      @Nullable IMPC getMPCOfID(@Nullable String sID)
      Get the MPC with the specified ID.
      Parameters:
      sID - The ID to search. May be null.
      Returns:
      null if no such MPC exists, the MPC otherwise.
    • containsWithID

      boolean containsWithID(@Nullable String sID)
      Check if an MPC with the specified ID is contained.
      Parameters:
      sID - The ID to search. May be null.
      Returns:
      true if such an MPC is contained, false otherwise.
    • getMPCOrDefaultOfID

      @Nullable default IMPC getMPCOrDefaultOfID(@Nullable String sID)
      Get the MPC with the specified ID, or the default MPC.
      Parameters:
      sID - The ID to search. If it is null or empty, the default MPC will be used.
      Returns:
      null if no such MPC exists, the MPC otherwise.
      See Also: