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.SessionPlus;
008    import railo.runtime.type.scope.storage.MemoryScope;
009    import railo.runtime.type.scope.storage.StorageScopeMemory;
010    
011    public class SessionMemory extends StorageScopeMemory implements SessionPlus,MemoryScope {
012            /**
013             * Constructor of the class
014             * @param pc
015             * @param isNew 
016             * @param name
017             */
018            protected SessionMemory(PageContext pc,Log log) {
019                    super(pc,"session",SCOPE_SESSION,log);
020            }
021    
022            /**
023             * Constructor of the class, clone existing
024             * @param other
025             */
026            protected SessionMemory(StorageScopeMemory other,boolean deepCopy) {
027                    super(other,deepCopy);
028            }
029            /**
030             * load a new instance of the class
031             * @param pc
032             * @param isNew 
033             * @return
034             */
035            public static SessionPlus getInstance(PageContext pc, RefBoolean isNew, Log log) {
036                    isNew.setValue(true);
037                    return new SessionMemory(pc,log);
038            }
039            
040            
041            /**
042             *
043             * @see railo.runtime.type.Collection#duplicate(boolean)
044             */
045            public Collection duplicate(boolean deepCopy) {
046            return new SessionMemory(this,deepCopy);
047            }
048    }