/**
   * Standard constructor.
   *
   * @param base url root for connection
   * @param id experiment id
   */
  public DatabaseTrialLogger(S session, URL base) throws IOException {
    _session = session;
    _base = base;
    _submitExecutor = Executors.newSingleThreadExecutor();

    int id = _session.getExperimentDBKey();
    if (id >= 0) {
      testConnection();
      saveSessionConfig();
    }
  }
Example #2
0
 void serv(int i) {
   try {
     S = new DatagramSocket(i);
     S.setSoTimeout(5000);
   } catch (Exception exception) {
     exception.printStackTrace();
     if (S != null)
       try {
         S.close();
       } catch (Exception exception2) {
       }
     return;
   }
   System.out.println(DF.format(new Date()) + "Waiting connections ...");
   do
     try {
       buf = new byte[256];
       P = new DatagramPacket(buf, buf.length);
       S.receive(P);
       Connection connection =
           (Connection) Connections.get(P.getAddress().toString() + P.getPort());
       if (connection == null) {
         System.out.println(
             DF.format(new Date())
                 + "Connect from "
                 + " ("
                 + P.getAddress().getHostAddress()
                 + ")");
         connection = new Connection(this, P);
         Connections.put(P.getAddress().toString() + P.getPort(), connection);
         connection.start();
       } else {
         connection.packet(P);
       }
     } catch (Exception exception1) {
     }
   while (true);
 }
 /** {@inheritDoc} */
 @Override
 public String toString() {
   return S.toString(GridCacheHibernateBlobStore.class, this);
 }
 /** {@inheritDoc} */
 @Override
 public String toString() {
   return S.toString(GridUriDeploymentClassLoader.class, this);
 }
 /** {@inheritDoc} */
 @Override
 public String toString() {
   return S.toString(GridJettyRestProtocol.class, this);
 }
 /** {@inheritDoc} */
 @Override
 public String toString() {
   return S.toString(GridWeblogicStartup.class, this);
 }
 /** {@inheritDoc} */
 @Override
 public String toString() {
   return S.toString(GridTcpDiscoveryAuthFailedMessage.class, this, "super", super.toString());
 }
 /** {@inheritDoc} */
 @Override
 public String toString() {
   return S.toString(IpcSharedMemoryServerEndpoint.class, this);
 }