1 17 package org.apache.geronimo.clustering.wadi; 18 19 import java.io.Serializable ; 20 import java.net.URI ; 21 22 26 public class WADISessionManagerConfigInfo implements Serializable { 27 private final URI serviceSpaceURI; 28 private final int sweepInterval; 29 private final int numPartitions; 30 private final int sessionTimeoutSeconds; 31 32 public WADISessionManagerConfigInfo(URI serviceSpaceURI, int sweepInterval, int numPartitions, 33 int sessionTimeoutSeconds) { 34 if (null == serviceSpaceURI) { 35 throw new IllegalArgumentException ("serviceSpaceURI is required"); 36 } else if (1 > sweepInterval) { 37 throw new IllegalArgumentException ("sweepInterval must be greater than 0"); 38 } else if (1 > numPartitions) { 39 throw new IllegalArgumentException ("numPartitions must be greater than 0"); 40 } else if (1 > sessionTimeoutSeconds) { 41 throw new IllegalArgumentException ("sessionTimeoutSeconds must be greater than 0"); 42 } 43 this.serviceSpaceURI = serviceSpaceURI; 44 this.sweepInterval = sweepInterval; 45 this.numPartitions = numPartitions; 46 this.sessionTimeoutSeconds = sessionTimeoutSeconds; 47 } 48 49 public int getNumPartitions() { 50 return numPartitions; 51 } 52 53 public URI getServiceSpaceURI() { 54 return serviceSpaceURI; 55 } 56 57 public int getSessionTimeoutSeconds() { 58 return sessionTimeoutSeconds; 59 } 60 61 public int getSweepInterval() { 62 return sweepInterval; 63 } 64 65 } 66 | Popular Tags |