1 package org.myoodb.core.storage; 25 26 import org.myoodb.core.*; 27 import org.myoodb.exception.*; 28 29 public class ObjectContainer extends AbstractObjectContainer 30 { 31 public ObjectContainer() 32 { 33 } 34 35 public ObjectContainer(Identifier objectId) 36 { 37 super(STATE_CREATED, objectId); 38 } 39 40 public void setDeactivationFlag(boolean flag) throws Exception 41 { 42 super.setDeactivationFlag(flag); 43 44 Cluster cluster = (Cluster) m_cluster; 46 cluster.write(); 48 49 if (getDeactivationFlag() == true) 50 { 51 if (getLock().getLockLevel(null) >= Lock.ACCESS_WRITE) 52 { 53 throw new PermissionException("Invalid deactivation (object is being modified): " + getTarget()); 54 } 55 56 ObjectStore objectStore = (ObjectStore) MyOodbManager.getTheManager().getStoreManager(); 57 objectStore.m_clusterStore.unloadCluster(cluster.getObjectId()); 58 } 59 else 60 { 61 } 63 } 64 } 65 | Popular Tags |