001/* 002 * Copyright (c) 2014 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Florent Guillaume 011 */ 012package org.nuxeo.ecm.core.storage.mem; 013 014import org.nuxeo.ecm.core.repository.RepositoryFactory; 015 016/** 017 * In-memory implementation of a {@link RepositoryFactory}, creating a {@link MemRepository}. 018 * 019 * @since 5.9.4 020 */ 021public class MemRepositoryFactory implements RepositoryFactory { 022 023 protected String repositoryName; 024 025 @Override 026 public void init(String repositoryName) { 027 this.repositoryName = repositoryName; 028 } 029 030 @Override 031 public Object call() { 032 return new MemRepository(repositoryName); 033 } 034 035}