last thing i wanted to make a config setting
This commit is contained in:
		
							parent
							
								
									e77ee73bfc
								
							
						
					
					
						commit
						0a18eeb5f3
					
				@ -10,3 +10,4 @@ app.interval_days=4
 | 
				
			|||||||
app.string_count=14000
 | 
					app.string_count=14000
 | 
				
			||||||
app.thread_count=4
 | 
					app.thread_count=4
 | 
				
			||||||
app.interval_days_minus=4
 | 
					app.interval_days_minus=4
 | 
				
			||||||
 | 
					app.random_length=2.5
 | 
				
			||||||
 | 
				
			|||||||
@ -587,7 +587,13 @@ public class Datahandler {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //System.out.println(ues_copy.toString());
 | 
					        //System.out.println(ues_copy.toString());
 | 
				
			||||||
        ArrayList<Future<SentimentAnalyzerTest>> futures = new ArrayList<>();
 | 
					        ArrayList<Future<SentimentAnalyzerTest>> futures = new ArrayList<>();
 | 
				
			||||||
 | 
					        Properties prop = new Properties();
 | 
				
			||||||
 | 
					        String fileName = "app.config";
 | 
				
			||||||
 | 
					        try (FileInputStream fis = new FileInputStream(fileName)) {
 | 
				
			||||||
 | 
					            prop.load(fis);
 | 
				
			||||||
 | 
					        } catch (FileNotFoundException ex) {
 | 
				
			||||||
 | 
					        } catch (IOException ex) {
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        for (String str1 : ues_copy) {
 | 
					        for (String str1 : ues_copy) {
 | 
				
			||||||
            if (strF != str1) {
 | 
					            if (strF != str1) {
 | 
				
			||||||
                //critical section
 | 
					                //critical section
 | 
				
			||||||
@ -726,8 +732,6 @@ public class Datahandler {
 | 
				
			|||||||
            } catch (InterruptedException e) {
 | 
					            } catch (InterruptedException e) {
 | 
				
			||||||
                //throw new RuntimeException(e);
 | 
					                //throw new RuntimeException(e);
 | 
				
			||||||
                pending = 0;
 | 
					                pending = 0;
 | 
				
			||||||
                Properties prop = new Properties();
 | 
					 | 
				
			||||||
                String fileName = "app.config";
 | 
					 | 
				
			||||||
                try (FileInputStream fis = new FileInputStream(fileName)) {
 | 
					                try (FileInputStream fis = new FileInputStream(fileName)) {
 | 
				
			||||||
                    prop.load(fis);
 | 
					                    prop.load(fis);
 | 
				
			||||||
                } catch (FileNotFoundException ex) {
 | 
					                } catch (FileNotFoundException ex) {
 | 
				
			||||||
@ -740,8 +744,6 @@ public class Datahandler {
 | 
				
			|||||||
            } catch (ExecutionException e) {
 | 
					            } catch (ExecutionException e) {
 | 
				
			||||||
                //throw new RuntimeException(e);
 | 
					                //throw new RuntimeException(e);
 | 
				
			||||||
                pending = 0;
 | 
					                pending = 0;
 | 
				
			||||||
                Properties prop = new Properties();
 | 
					 | 
				
			||||||
                String fileName = "app.config";
 | 
					 | 
				
			||||||
                try (FileInputStream fis = new FileInputStream(fileName)) {
 | 
					                try (FileInputStream fis = new FileInputStream(fileName)) {
 | 
				
			||||||
                    prop.load(fis);
 | 
					                    prop.load(fis);
 | 
				
			||||||
                } catch (FileNotFoundException ex) {
 | 
					                } catch (FileNotFoundException ex) {
 | 
				
			||||||
@ -762,9 +764,10 @@ public class Datahandler {
 | 
				
			|||||||
        //double randomLenghtPermit = strF.length() * (Math.random() * Math.random() * (Math.random() * 10));
 | 
					        //double randomLenghtPermit = strF.length() * (Math.random() * Math.random() * (Math.random() * 10));
 | 
				
			||||||
        Collections.reverse(concurrentRelations);
 | 
					        Collections.reverse(concurrentRelations);
 | 
				
			||||||
        ArrayList<String> mysqlUpdateLastUsed = new ArrayList();
 | 
					        ArrayList<String> mysqlUpdateLastUsed = new ArrayList();
 | 
				
			||||||
 | 
					        Double aDouble = Double.valueOf(prop.getProperty("app.random_length"));
 | 
				
			||||||
        if (!concurrentRelations.isEmpty()) {
 | 
					        if (!concurrentRelations.isEmpty()) {
 | 
				
			||||||
            for (String secondaryRelation : concurrentRelations) {
 | 
					            for (String secondaryRelation : concurrentRelations) {
 | 
				
			||||||
                if (SB.toString().length() > strF.length() * 3 && !SB.toString().isEmpty()) {
 | 
					                if (SB.toString().length() > strF.length() * aDouble && !SB.toString().isEmpty()) {
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user