diff src/main/java/alice/topology/manager/keeparive/TaskInfo.java @ 345:8f71c3e6f11d

Change directory structure Maven standard
author sugi
date Wed, 16 Apr 2014 18:26:07 +0900
parents
children aefbe41fcf12
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/alice/topology/manager/keeparive/TaskInfo.java	Wed Apr 16 18:26:07 2014 +0900
@@ -0,0 +1,56 @@
+package alice.topology.manager.keeparive;
+
+public class TaskInfo {
+	private TaskType type;
+	private long sleepTime;
+	private String managerKey;
+	private String returnKey;
+	
+	public TaskInfo(TaskType t){
+		type = t;
+	}
+	
+	public void setInfo(String managerKey, long time){
+		this.managerKey = managerKey;
+		sleepTime = time;
+	}
+	
+	public void setInfo(String managerKey, String returnKey, long time){
+		this.managerKey = managerKey;
+		this.returnKey = returnKey;
+		sleepTime = time;
+	}
+	
+	public TaskType getType(){
+		return type;
+	}
+	
+	public long getSleepTime(){
+		return sleepTime;
+	}
+	
+	public void setSleepTime(long time){
+		sleepTime = time;
+	}
+
+	public String getManagerKey(){
+		return managerKey;
+	}
+	
+	public String getReturnKey(){
+		return returnKey;
+	}
+	
+	public TaskInfo clone(){
+		TaskInfo task = new TaskInfo(type);
+		task.setInfo(managerKey, returnKey, sleepTime);
+		return task;
+	}
+	
+	public void show(){
+		System.out.print(type);
+		System.out.print(" "+  this.sleepTime);
+		System.out.print(" "+ this.managerKey);
+		System.out.println(" "+  this.returnKey);
+	}
+}