Package org.hsqldb_voltpatches.lib

Examples of org.hsqldb_voltpatches.lib.Iterator


        map.remove(name);
    }

    void removeParent(HsqlName parent) {

        Iterator it = map.values().iterator();

        while (it.hasNext()) {
            if (type == SchemaObject.TRIGGER) {
                SchemaObject trigger = (SchemaObject) it.next();

                if (trigger.getName().parent == parent) {
                    it.remove();
                }
            } else {
                HsqlName name = (HsqlName) it.next();

                if (name.parent == parent) {
                    it.remove();
                }
            }
        }
    }
View Full Code Here


        if (map.isEmpty()) {
            return ValuePool.emptyStringArray;
        }

        Iterator it = map.values().iterator();

        if (type == SchemaObject.FUNCTION || type == SchemaObject.PROCEDURE) {
            OrderedHashSet set = new OrderedHashSet();

            while (it.hasNext()) {
                RoutineSchema routine = (RoutineSchema) it.next();

                for (int i = 0; i < routine.routines.length; i++) {
                    set.add(routine.routines[i]);
                }
            }

            it = set.iterator();
        }

        while (it.hasNext()) {
            SchemaObject   object     = (SchemaObject) it.next();
            OrderedHashSet references = object.getReferences();

            if (references != null) {
                boolean isResolved = true;
View Full Code Here

    protected void writeExistingData() throws IOException {

        // start with blank schema - SET SCHEMA to log
        currentSession.loggedSchema = null;

        Iterator schemas = database.schemaManager.allSchemaNameIterator();

        while (schemas.hasNext()) {
            String schema = (String) schemas.next();
            Iterator tables =
                database.schemaManager.databaseObjectIterator(schema,
                    SchemaObject.TABLE);

            while (tables.hasNext()) {
                Table t = (Table) tables.next();

                // write all memory table data
                // write cached table data unless index roots have been written
                // write all text table data apart from readonly text tables
                // unless index roots have been written
View Full Code Here

        if (resultMap == null) {
            return;
        }

        Iterator it = resultMap.values().iterator();

        while (it.hasNext()) {
            Result result = (Result) it.next();

            result.getNavigator().close();
        }

        resultMap.clear();
View Full Code Here

        if (resultMap == null) {
            return;
        }

        Iterator it = resultMap.values().iterator();

        while (it.hasNext()) {
            Result result = (Result) it.next();

            if (result.rsHoldability
                    == ResultConstants.CLOSE_CURSORS_AT_COMMIT) {
                result.getNavigator().close();
                it.remove();
            }
        }

        resultMap.clear();
    }
View Full Code Here

                    i--;
                }
            }

            if (!lobUsageCount.isEmpty()) {
                Iterator it = lobUsageCount.keySet().iterator();

                while (it.hasNext()) {
                    long lobID = it.nextLong();
                    int  delta = lobUsageCount.get(lobID);

                    database.lobManager.adjustUsageCount(lobID, delta - 1);
                }
View Full Code Here

     * Returns a vector containing the URI (type + path) for all the databases.
     */
    public static Vector getDatabaseURIs() {

        Vector   v  = new Vector();
        Iterator it = databaseIDMap.values().iterator();

        while (it.hasNext()) {
            Database db = (Database) it.next();

            v.addElement(db.getURI());
        }

        return v;
View Full Code Here

     * CLOSEMODE_COMPACT     = 1;
     * CLOSEMODE_SCRIPT      = 2;
     */
    public static void closeDatabases(int mode) {

        Iterator it = databaseIDMap.values().iterator();

        while (it.hasNext()) {
            Database db = (Database) it.next();

            try {
                db.close(mode);
            } catch (HsqlException e) {}
        }
View Full Code Here

    /**
     * Deregisters a server as serving a given database. Not yet used.
     */
    private static void deRegisterServer(Server server, Database db) {

        Iterator it = serverMap.values().iterator();

        for (; it.hasNext(); ) {
            HashSet databases = (HashSet) it.next();

            databases.remove(db);

            if (databases.isEmpty()) {
                it.remove();
            }
        }
    }
View Full Code Here

     * Notifies all servers that serve the database that the database has been
     * shutdown.
     */
    private static void notifyServers(Database db) {

        Iterator it = serverMap.keySet().iterator();

        for (; it.hasNext(); ) {
            Server  server    = (Server) it.next();
            HashSet databases = (HashSet) serverMap.get(server);

            if (databases.contains(db)) {
// A VoltDB extension to disable a package dependency
/* disable 2 lines ...
View Full Code Here

TOP

Related Classes of org.hsqldb_voltpatches.lib.Iterator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.