001    package railo.runtime.type.scope.session;
002    
003    import railo.commons.io.log.Log;
004    import railo.commons.lang.types.RefBoolean;
005    import railo.runtime.PageContext;
006    import railo.runtime.type.Collection;
007    import railo.runtime.type.scope.Session;
008    import railo.runtime.type.scope.storage.MemoryScope;
009    import railo.runtime.type.scope.storage.StorageScopeMemory;
010    
011    public class SessionMemory extends StorageScopeMemory implements Session,MemoryScope {
012            
013            private static final long serialVersionUID = 7703261878730061485L;
014    
015    
016            /**
017             * Constructor of the class
018             * @param pc
019             * @param isNew 
020             * @param name
021             */
022            protected SessionMemory(PageContext pc,Log log) {
023                    super(pc,"session",SCOPE_SESSION,log);
024            }
025    
026            /**
027             * Constructor of the class, clone existing
028             * @param other
029             */
030            protected SessionMemory(StorageScopeMemory other,boolean deepCopy) {
031                    super(other,deepCopy);
032            }
033            /**
034             * load a new instance of the class
035             * @param pc
036             * @param isNew 
037             * @return
038             */
039            public static Session getInstance(PageContext pc, RefBoolean isNew, Log log) {
040                    isNew.setValue(true);
041                    return new SessionMemory(pc,log);
042            }
043            
044            
045            @Override
046            public Collection duplicate(boolean deepCopy) {
047            return new SessionMemory(this,deepCopy);
048            }
049    }