public void deleteKeyspace ( KeyspaceImpl keyspace ) { Lock lock = lockManager . getLock ( getLockingKey ( keyspace ) ) ; lock . lock ( ) ; try { if ( keyspaceCacheMap . containsKey ( keyspace ) ) { KeyspaceCacheContainer container = keyspaceCacheMap . remove ( keyspace ) ; container . graph ( ) . close ( ) ; container . invalidateSessions ( ) ; } } finally { lock . unlock ( ) ; } }
Invoked when user deletes a keyspace . Remove keyspace reference from internal cache closes graph associated to it and invalidates all the open sessions .