public class DomainPingExecution {
- String state;
+ private String state;
- String type;
+ private String type;
- String info;
+ private String info;
- String result;
+ private String result;
- DomainPingConfiguration config;
+ private DomainPingConfiguration config;
public DomainPingExecution(ResultSet rs) throws SQLException {
state = rs.getString(1);
return owner;
}
+ @Override
public int getId() {
return id;
}
private static ObjectCache<Domain> myCache = new ObjectCache<>();
- public static Domain getById(int id) throws IllegalArgumentException {
+ public static synchronized Domain getById(int id) throws IllegalArgumentException {
Domain em = myCache.get(id);
if (em == null) {
try {
- synchronized (Domain.class) {
- myCache.put(em = new Domain(id));
- }
+ myCache.put(em = new Domain(id));
} catch (SQLException e1) {
throw new IllegalArgumentException(e1);
}