001package jmri.managers;
002
003import javax.annotation.CheckForNull;
004import javax.annotation.Nonnull;
005import jmri.Memory;
006import jmri.implementation.DefaultMemory;
007import jmri.jmrix.internal.InternalSystemConnectionMemo;
008
009/**
010 * Provide the concrete implementation for the Internal Memory Manager.
011 *
012 * @author Bob Jacobsen Copyright (C) 2004
013 */
014public class DefaultMemoryManager extends AbstractMemoryManager {
015
016    public DefaultMemoryManager(InternalSystemConnectionMemo memo) {
017        super(memo);
018    }
019
020    @Override
021    @Nonnull
022    protected Memory createNewMemory(@Nonnull String systemName, @CheckForNull String userName) throws IllegalArgumentException {
023        // makeSystemName validates that systemName is correct
024        return new DefaultMemory(makeSystemName(systemName), userName);
025    }
026
027}