1 6 package org.logicalcobwebs.proxool; 7 8 import org.logicalcobwebs.proxool.util.FastArrayList; 9 10 import java.util.Date ; 11 import java.util.List ; 12 13 22 class ConnectionInfo implements ConnectionInfoIF { 23 24 private Date birthDate; 25 26 private long age; 27 28 private long id; 29 30 private int mark; 31 32 private int status; 33 34 private long timeLastStartActive; 35 36 private long timeLastStopActive; 37 38 private String requester; 39 40 private String delegateDriver; 41 42 private String delegateUrl; 43 44 private String proxyHashcode; 45 46 private String delegateHashcode; 47 48 private List sqlCalls = new FastArrayList(); 49 50 public Date getBirthDate() { 51 return birthDate; 52 } 53 54 public long getBirthTime() { 55 return birthDate.getTime(); 56 } 57 58 public void setBirthDate(Date birthDate) { 59 this.birthDate = birthDate; 60 } 61 62 public long getAge() { 63 return age; 64 } 65 66 public void setAge(long age) { 67 this.age = age; 68 } 69 70 public long getId() { 71 return id; 72 } 73 74 public void setId(long id) { 75 this.id = id; 76 } 77 78 public int getMark() { 79 return mark; 80 } 81 82 public void setMark(int mark) { 83 this.mark = mark; 84 } 85 86 public int getStatus() { 87 return status; 88 } 89 90 public void setStatus(int status) { 91 this.status = status; 92 } 93 94 public long getTimeLastStartActive() { 95 return timeLastStartActive; 96 } 97 98 public void setTimeLastStartActive(long timeLastStartActive) { 99 this.timeLastStartActive = timeLastStartActive; 100 } 101 102 public long getTimeLastStopActive() { 103 return timeLastStopActive; 104 } 105 106 public void setTimeLastStopActive(long timeLastStopActive) { 107 this.timeLastStopActive = timeLastStopActive; 108 } 109 110 public String getRequester() { 111 return requester; 112 } 113 114 public void setRequester(String requester) { 115 this.requester = requester; 116 } 117 118 public String getDelegateDriver() { 119 return delegateDriver; 120 } 121 122 public void setDelegateDriver(String delegateDriver) { 123 this.delegateDriver = delegateDriver; 124 } 125 126 public String getDelegateUrl() { 127 return delegateUrl; 128 } 129 130 public void setDelegateUrl(String delegateUrl) { 131 this.delegateUrl = delegateUrl; 132 } 133 134 public String getProxyHashcode() { 135 return proxyHashcode; 136 } 137 138 public void setProxyHashcode(String proxyHashcode) { 139 this.proxyHashcode = proxyHashcode; 140 } 141 142 public String getDelegateHashcode() { 143 return delegateHashcode; 144 } 145 146 public void setDelegateHashcode(String delegateHashcode) { 147 this.delegateHashcode = delegateHashcode; 148 } 149 150 156 public int compareTo(Object o) { 157 return new Long (((ConnectionInfoIF) o).getId()).compareTo(new Long (getId())); 158 } 159 160 public String [] getSqlCalls() { 161 return (String []) sqlCalls.toArray(new String [0]); 162 } 163 164 public void addSqlCall(String sqlCall) { 165 this.sqlCalls.add(sqlCall); 166 } 167 } 168 169 170 | Popular Tags |