Interface ICalendarManager

All Superinterfaces:
AutoCloseable

public interface ICalendarManager extends AutoCloseable
Calendar Manager implements calendar objects persistance
  • Method Details

    • getCalendarByID

      ICalendar getCalendarByID(String calendarID) throws CalendarException
      Returns calendar object by its ID. Returns null of no calendar is found for specified calendar ID
      Parameters:
      calendarID -
      Returns:
      ICalendar object for specified ID or null
      Throws:
      CalendarException
    • getCalendarByAlias

      ICalendar getCalendarByAlias(String alias) throws CalendarException
      Returns calendar object by its alias. Returns null of no calendar is found for specified calendar alias
      Parameters:
      alias - calendar alias value
      Returns:
      ICalendar object for specified alias or null
      Throws:
      CalendarException
    • listCalendars

      List<ICalendar> listCalendars(String location) throws CalendarException
      Returns list of ICalendar objects stored in the specified location
      Parameters:
      location - ID or alias of the storage folder for calendars
      Returns:
      List of ICalendar objects
      Throws:
      CalendarException
    • deleteCalendar

      void deleteCalendar(String calendarID) throws CalendarException
      Deletes a calendar for given calendar ID. Does nothing if calendar ID is invalid or calendar with specified ID was already deleted
      Parameters:
      calendarID -
      Throws:
      CalendarException
    • storeCalendar

      void storeCalendar(String location, ICalendar calendar) throws CalendarException
      Stores specified calendar object at the specified location folder. This operation could be used to store new calendar object (new auto-generated calendar ID will be assigned to these) or update existing calendars
      Parameters:
      location - ID or alias of the folder to store calendar at
      calendar - calendar object to store. If this is a new calendar then its ID will be populated with valid value
      Throws:
      CalendarException
    • getDefaultCalendarID

      String getDefaultCalendarID() throws CalendarException
      Returns system default calendar ID. Null if not defined
      Returns:
      calendar ID or null
      Throws:
      CalendarException
    • setDefaultCalendarID

      void setDefaultCalendarID(String calendarID) throws CalendarException
      Sets the calendar with the supplied ID as the default system calendar. Removes the setting when a null value is supplied.
      Parameters:
      calendarID - calendar ID
      Throws:
      CalendarException
    • close

      void close()
      Release any resources
      Specified by:
      close in interface AutoCloseable
    • beginConversation

      default void beginConversation()
      Mark the current transient conversation long-running. Starting with the next exchanged message, all further communication will be handled by the same cluster node until the #end() is invoked.
    • endConversation

      default void endConversation()
      Mark the current long-running conversation transient. The next exchanged message will not be sent to a specific cluster node rather the next available one
    • isConversation

      default boolean isConversation()
      Returns if the conversation is marked transient or long-running
      Returns:
      true if a converation is in progress, false otherwise