Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc' into mc++
[simgrid.git] / examples / java / kademlia / KademliaTask.java
1 /* Copyright (c) 2012-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 package kademlia;
8
9 import kademlia.Common;
10
11 import org.simgrid.msg.Task;
12
13 /**
14  * @brief Base class for all the tasks related to Kademlia.
15  */
16 public class KademliaTask extends Task {
17         /**
18          * Sender id
19          */
20         protected int senderId;
21         
22         /**
23          * Constructor
24          */
25         public KademliaTask(int senderId) {
26                 super("kademliatask",Common.COMP_SIZE,Common.COMM_SIZE);
27                 this.senderId = senderId;
28         }
29         public int getSenderId() {
30                 return senderId;
31         }
32 }