NodeReference getIndexGlobal(String name) { NodeReference iGlobal = indexGlobalMap.get(name); if (iGlobal == null) { iGlobal = connection.createNodeReference(name + "I"); indexGlobalMap.put(name, iGlobal); } return iGlobal; }
NodeReference getReferenceGlobal(String name) { NodeReference refGlobal = refGlobalMap.get(name); if (refGlobal == null) { refGlobal = connection.createNodeReference(name); refGlobalMap.put(name, refGlobal); } refGlobal.setSubscriptCount(0); return refGlobal; }
private void setDocumentType(String name) { NodeReference schemaGlobal = connection.createNodeReference("Schema"); schemaGlobal.appendSubscript(name); if (!schemaGlobal.exists()) { documentType = null; return; } documentType = DocumentType.createDocumentType(name); documentType.load(connection, schemaGlobal.getList()); }
DocumentMap(String n, Connection conn) { connection = conn; name = n; global = connection.createNodeReference(name); indexGlobal = connection.createNodeReference(name + "I"); valueList = connection.createList(); scratchList = connection.createList(); writeList = connection.createList(); referenceTempList = connection.createList(); refGlobalMap = new HashMap<String, NodeReference>(); indexGlobalMap = new HashMap<String, NodeReference>(); setDocumentType(name); allIndices = new HashMap<String, HashMap<Object, Object>>(); if (documentType.indices != null) { for (int i = 0; i < documentType.indices.size(); i++) { allIndices.put(documentType.indices.get(i), new HashMap<Object, Object>()); } } // executor = Executors.newCachedThreadPool(); }