Class MOServerPersistence



  • public class MOServerPersistence
    extends Object
    The MOServerPersistence provides persistence operations to load and save serialized MIB data.
    Version:
    1.4
    Author:
    Frank Fock
    • Constructor Detail

      • MOServerPersistence

        public MOServerPersistence​(MOServer server)
      • MOServerPersistence

        public MOServerPersistence​(MOServer[] moServers)
    • Method Detail

      • saveData

        public void saveData​(MOOutput output)
                      throws IOException
        Saves the serializable data of the associated servers to the given MOOutput. This method can be called while the registrations of the MOServers are changed, because MOServer.iterator() is synchronized and returns a copy tree of the registered objects.
        Parameters:
        output - a MOOutput instance to store the data.
        Throws:
        IOException - if the output stream cannot be written.
      • saveData

        public void saveData​(MOOutput output,
                             MOPriorityProvider priorityProvider)
                      throws IOException
        Saves the serializable data of the associated servers to the given MOOutput in the order defined by MOPriorityProvider. This method can be called while the registrations of the MOServers are changed, because MOServer.iterator() is synchronized and returns a copy tree of the registered objects.
        Parameters:
        output - a MOOutput instance to store the data.
        priorityProvider - if not null, the objects of the servers are stored in order defined by this priority provider. Objects with lowest priority value, will be saved first.
        Throws:
        IOException - if the output stream cannot be written.