Interface IMPCManager

All Known Implementing Classes:
MPCManagerInMemory, MPCManagerXML

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
    containsWithID(@Nullable String sID)
    Check if an MPC with the specified ID is contained.
    void
    createMPC(@NonNull MPC aMPC)
    Create a new MPC.
    @NonNull com.helger.base.state.EChange
    deleteMPC(@Nullable String sMPCID)
    Delete the MPC with the provided ID.
    @Nullable IMPC
    getMPCOfID(@Nullable String sID)
    Get the MPC with the specified ID.
    default @Nullable IMPC
    getMPCOrDefaultOfID(@Nullable String sID)
    Get the MPC with the specified ID, or the default MPC.
    @NonNull com.helger.base.state.EChange
    markMPCDeleted(@Nullable String sMPCID)
    Mark the MPC with the provided ID as deleted.
    @NonNull com.helger.base.state.EChange
    updateMPC(@NonNull IMPC aMPC)
    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.base.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.base.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.base.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

      default @Nullable 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: