.settings/
 .project
 .classpath
+*.DS_Store
 src/main/resources/etc/scriptdata/addmanualdata/tenant_isolation/payload/
 
                String targetDataType = "";
                String targetIndexInfo = "";
                String preserveDataFlag = "";
+               String consistencyLockFlag = "";
                String commitBlockSizeStr = "";
                long commitBlockSize = 120000;
 
-               String usageString = "Usage: SchemaMod propertyName targetDataType targetIndexInfo preserveDataFlag [blockSize] \n";
+               String usageString = "Usage: SchemaMod propertyName targetDataType targetIndexInfo preserveDataFlag consistencyLockFlag [blockSize] \n";
                
-               if (args.length == 4) {
+               if (args.length == 5) {
                        propName = args[0];
                        targetDataType = args[1];
                        targetIndexInfo = args[2];
                        preserveDataFlag = args[3];
+                       consistencyLockFlag = args[4];
                }
-               else if (args.length == 5) {
+               else if (args.length == 6) {
                        propName = args[0];
                        targetDataType = args[1];
                        targetIndexInfo = args[2];
                        preserveDataFlag = args[3];
-                       commitBlockSizeStr = args[4];
+                       consistencyLockFlag = args[4];
+                       commitBlockSizeStr = args[5];
                }
                else {
                        String emsg = "Incorrect number of Parameters passed.  \n" + usageString;
         TransactionalGraphEngine engine = null;
         try {
             engine = new JanusGraphDBEngine(queryStyle, loader);
-            SchemaModInternalBatch internal = new SchemaModInternalBatch(engine, logger, propName, targetDataType, targetIndexInfo, Boolean.parseBoolean(preserveDataFlag), commitBlockSize);
+            SchemaModInternalBatch internal = new SchemaModInternalBatch(engine, logger, propName, targetDataType, targetIndexInfo, Boolean.parseBoolean(preserveDataFlag), Boolean.parseBoolean(consistencyLockFlag), commitBlockSize);
             internal.execute();
             engine.startTransaction();
             engine.tx().close();
 
 import org.apache.tinkerpop.gremlin.structure.Graph;
 import org.apache.tinkerpop.gremlin.structure.Vertex;
 import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.janusgraph.core.schema.ConsistencyModifier;
+import org.janusgraph.core.schema.JanusGraphIndex;
 import org.onap.aai.serialization.engines.TransactionalGraphEngine;
 import org.onap.aai.util.FormatDate;
 
        private final Class<?> type;
        private final String indexType;
        private final boolean preserveData;
+       private final boolean consistencyLock;
        private final Cardinality cardinality;
        private final long commitBlockSize;
        private final Logger logger;
        
        public SchemaModInternalBatch(TransactionalGraphEngine engine, Logger logger, String propName,  
-                               String type, String indexType, boolean preserveData, long commitBlockSize) {
+                               String type, String indexType, boolean preserveData, boolean consistencyLock, long commitBlockSize) {
                this.engine = engine;
                this.propName = propName;
                this.type = determineClass(type);
                this.indexType = indexType;
                this.preserveData = preserveData;
+               this.consistencyLock = consistencyLock;
                this.cardinality = determineCardinality(type);
                this.commitBlockSize = commitBlockSize;
                this.logger = logger;
                        // targetDataType
                        PropertyKey freshPropKey = graphMgt.makePropertyKey(propName).dataType(type)
                                        .cardinality(cardinality).make();
-       
+                       if (consistencyLock) {
+                               logAndPrint(logger, " -- Consistency Lock is being set on the property ");
+                               graphMgt.setConsistency(freshPropKey, ConsistencyModifier.LOCK);
+                       }
                        // Create the appropriate index (if any)
+                       JanusGraphIndex indexG = null;
                        if (indexType.equals("uniqueIndex")) {
                                String freshIndexName = propName + dteStr;
-                               graphMgt.buildIndex(freshIndexName, Vertex.class).addKey(freshPropKey).unique().buildCompositeIndex();
+                               indexG = graphMgt.buildIndex(freshIndexName, Vertex.class).addKey(freshPropKey).unique().buildCompositeIndex();
                        } else if (indexType.equals("index")) {
                                String freshIndexName = propName + dteStr;
-                               graphMgt.buildIndex(freshIndexName, Vertex.class).addKey(freshPropKey).buildCompositeIndex();
+                               indexG = graphMgt.buildIndex(freshIndexName, Vertex.class).addKey(freshPropKey).buildCompositeIndex();
+                       }
+
+                       if(indexG != null && consistencyLock) {
+                               logAndPrint(logger, " -- Consistency Lock is being set on the index ");
+                               graphMgt.setConsistency(indexG, ConsistencyModifier.LOCK);
                        }
        
                        logAndPrint(logger, "Committing schema changes with graphMgt.commit()");
 
 #    just to change existing instances of the schema since schemaGenerator does not 
 #    update things - it just does the initial creation.
 #
-# To use this script, there are 4 required parameters, and one optional:
+# To use this script, there are 5 required parameters, and one optional:
 #      propertyName    -- the name of the property that you need to change either the index or dataType on
 #      targetDataType  -- whether it's changing or not, you need to give it:  String, Integer, Boolean or Long
 #      targetIndexInfo -- whether it's changing or not, you need to give it: index, noIndex or uniqueIndex
 #      preserveDataFlag -- true or false.     The only reason I can think of why you'd ever want to
 #                   set this to false would be maybe if you were changing to an incompatible dataType so didn't 
 #                   want it to try to use the old data (and fail).  But 99% of the time this will just be 'true'.
+#      consistencyLock -- true or false. Whether to enable consistency lock on the property or not
 #
 #      commitBlockSize -- OPTIONAL -- how many updates to commit at once.  
 #                  Default will be used if no value is passed.
 #
-# Ie.    schemaMod flavor-id String index true
-#   or,  schemaMod flavor-id String noIndex true 50000
+# Ie.    schemaMod flavor-id String index true true
+#   or,  schemaMod flavor-id String noIndex true true 50000
 #
 
 COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P )     
 start_date;
 check_user;
 
-if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
+if [ "$#" -ne 5 ] && [ "$#" -ne 6 ]; then
     echo "Illegal number of parameters"
-    echo "usage: $0 propertyName targetDataType targetIndexInfo preserveDataFlag [blockSize]"
+    echo "usage: $0 propertyName targetDataType targetIndexInfo preserveDataFlag consistencyLock [blockSize]"
     exit 1
 fi
 
 
        
        @Test
        public void testSchemaModDataType() throws AAIException {
-               String usageString = "Usage: SchemaMod propertyName targetDataType targetIndexInfo preserveDataFlag \n";
+               String usageString = "Usage: SchemaMod propertyName targetDataType targetIndexInfo preserveDataFlag consistencyLock \n";
                String[] args = {
-                               "hostname", "String", "noIndex", "false"
+                               "hostname", "String", "noIndex", "false", "false"
                };
 
                schemaMod.execute(args);