public static void registerDataPersisters ( DataPersister ... dataPersisters ) { // we build the map and replace it to lower the chance of concurrency issues List < DataPersister > newList = new ArrayList < DataPersister > ( ) ; if ( registeredPersisters != null ) { newList . addAll ( registeredPersisters ) ; } for ( DataPersister persister : dataPersisters ) { newList . add ( persister ) ; } registeredPersisters = newList ; }
Register a data type with the manager .