001/**
002 *
003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.
004 *
005 * This library is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU Lesser General Public
007 * License as published by the Free Software Foundation; either 
008 * version 2.1 of the License, or (at your option) any later version.
009 * 
010 * This library is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013 * Lesser General Public License for more details.
014 * 
015 * You should have received a copy of the GNU Lesser General Public 
016 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
017 * 
018 **/
019package lucee.runtime.type.scope.storage;
020
021import lucee.commons.io.log.Log;
022import lucee.runtime.PageContext;
023import lucee.runtime.type.StructImpl;
024import lucee.runtime.type.dt.DateTimeImpl;
025import lucee.runtime.type.scope.ScopeContext;
026
027/**
028 * client scope that not store it's data
029 */
030public abstract class StorageScopeMemory extends StorageScopeImpl implements MemoryScope {
031
032        private static final long serialVersionUID = -6917303245683342065L;
033
034
035        /**
036         * Constructor of the class
037         * @param pc
038         * @param log 
039         * @param name
040         */
041        protected StorageScopeMemory(PageContext pc,String strType, int type, Log log) {
042                super(
043                                new StructImpl(),
044                                new DateTimeImpl(pc.getConfig()),
045                                null,
046                                -1,1,strType,type);
047                ScopeContext.info(log,"create new memory based "+strType+" scope for "+pc.getApplicationContext().getName()+"/"+pc.getCFID());
048                
049        }
050
051        /**
052         * Constructor of the class, clone existing
053         * @param other
054         */
055        protected StorageScopeMemory(StorageScopeMemory other,boolean deepCopy) {
056                super(other,deepCopy);
057        }
058        
059        
060        
061
062        
063        @Override
064        public String getStorageType() {
065                return "Memory";
066        }
067}