예제 #1
0
 @Override
 public void run() {
   if (side == position.BOTTOM) {
     generateBottomEdge();
   } else if (side == position.LEFT) {
     generateLeftEdge();
   } else if (side == position.RIGHT) {
     generateRightEdge();
   }
 }
예제 #2
0
  @Override
  public void run() {
    try {
      LOG.log(Level.INFO, "Port: {0}", socket.getPort());

      this.out = new ObjectOutputStream(socket.getOutputStream());

      koch.generateBottomEdge();

      synchronized (this) {
        km.IncreaseCounter();
        if (km.getCounter() == 3) {
          System.out.println("Calculating finished with " + km.getAmountEdges() + " edges");
          // km.writeLockedMemMapped(level);
          System.out.println("Enter the kochlevel / q to stop : ");
          km.setCounter(0);
        }
      }

    } catch (IOException ex) {
      LOG.log(Level.SEVERE, null, ex);
    }
  }