1 package at.ac.tuwien.lsdc.federation;
3 import at.ac.tuwien.lsdc.types.Application;
6 * Cloudpartners management. Class to be used to ask cloudpartners to take one
7 * of our APPs over to their infrastructure.
12 public class Federation {
14 private int numPartners;
15 public final static int fak = 100;
16 public final static int th = 20;
18 public Federation(int numPartners) {
19 this.numPartners = numPartners;
23 * Try to outsource app.
26 * Application to outsource.
27 * @return true, if application can be outsourced.
29 public boolean askToOutsource(Application app) {
30 for (int i = 0; i < numPartners; i++) {
31 if (Math.random() * fak < th)