color
This commit is contained in:
		@@ -9,17 +9,17 @@ import org.apache.logging.log4j.Logger;
 | 
				
			|||||||
public abstract class ADataObject implements Serializable {
 | 
					public abstract class ADataObject implements Serializable {
 | 
				
			||||||
	private static final long serialVersionUID = 1L;
 | 
						private static final long serialVersionUID = 1L;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       	static final String KIND_KEY = "kind";
 | 
					    static final String KIND_KEY = "kind";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	final protected Logger logger = LogManager.getRootLogger();
 | 
						final protected Logger logger = LogManager.getRootLogger();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private String name;
 | 
						private String name;
 | 
				
			||||||
	private Map<String, Object> values;
 | 
						private Map<String, Object> values;
 | 
				
			||||||
        private String kind;
 | 
					    private String kind;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	public ADataObject(String name, String kind) {
 | 
						public ADataObject(String name, String kind) {
 | 
				
			||||||
		this.name = name;
 | 
							this.name = name;
 | 
				
			||||||
                this.kind = kind;
 | 
					        this.kind = kind;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public void setValues(Map<String, Object> values) {
 | 
						public void setValues(Map<String, Object> values) {
 | 
				
			||||||
@@ -40,6 +40,10 @@ public abstract class ADataObject implements Serializable {
 | 
				
			|||||||
		return name;
 | 
							return name;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
 | 
					    public String getKind() {
 | 
				
			||||||
 | 
					        return this.kind;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public String toString() {
 | 
						public String toString() {
 | 
				
			||||||
		StringBuffer sb = new StringBuffer();
 | 
							StringBuffer sb = new StringBuffer();
 | 
				
			||||||
                sb.append("{\"name\":\"");
 | 
					                sb.append("{\"name\":\"");
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,6 +37,9 @@ public class DummyDequeuer extends Thread {
 | 
				
			|||||||
        if (o.hasKey(ERROR_RATIO_KEY) && ((Double)o.getValues().get(ERROR_RATIO_KEY)) > 0.25) {
 | 
					        if (o.hasKey(ERROR_RATIO_KEY) && ((Double)o.getValues().get(ERROR_RATIO_KEY)) > 0.25) {
 | 
				
			||||||
          System.out.print(ANSI_RED);
 | 
					          System.out.print(ANSI_RED);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        if ("Statistics".equals(o.getKind())) {
 | 
				
			||||||
 | 
					          System.out.print(ANSI_BLUE);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        System.out.print("DummyDequeuer: " + o.toString());
 | 
					        System.out.print("DummyDequeuer: " + o.toString());
 | 
				
			||||||
        System.out.println(ANSI_RESET);
 | 
					        System.out.println(ANSI_RESET);
 | 
				
			||||||
      } catch (InterruptedException e) {
 | 
					      } catch (InterruptedException e) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user