1 24 25 package org.objectweb.cjdbc.controller.loadbalancer.raidb1; 26 27 import java.sql.SQLException ; 28 29 import org.objectweb.cjdbc.common.exceptions.NotImplementedException; 30 import org.objectweb.cjdbc.common.sql.SelectRequest; 31 import org.objectweb.cjdbc.common.sql.StoredProcedure; 32 import org.objectweb.cjdbc.common.xml.DatabasesXmlTags; 33 import org.objectweb.cjdbc.controller.cache.metadata.MetadataCache; 34 import org.objectweb.cjdbc.controller.loadbalancer.policies.WaitForCompletionPolicy; 35 import org.objectweb.cjdbc.controller.loadbalancer.policies.errorchecking.ErrorCheckingPolicy; 36 import org.objectweb.cjdbc.controller.virtualdatabase.ControllerResultSet; 37 import org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabase; 38 39 50 public class RAIDb1ec_RR extends RAIDb1ec 51 { 52 56 57 61 62 73 public RAIDb1ec_RR(VirtualDatabase vdb, 74 WaitForCompletionPolicy waitForCompletionPolicy, 75 ErrorCheckingPolicy errorCheckingPolicy, int nbOfConcurrentReads) 76 throws Exception 77 { 78 super(vdb, waitForCompletionPolicy, errorCheckingPolicy, 79 nbOfConcurrentReads); 80 } 82 83 86 87 92 public ControllerResultSet execReadRequest(SelectRequest request, MetadataCache metadataCache) 93 throws SQLException 94 { 95 throw new NotImplementedException(this.getClass().getName() 96 + ":execReadRequest"); 97 } 98 99 104 public ControllerResultSet execReadOnlyReadStoredProcedure(StoredProcedure proc, MetadataCache metadataCache) 105 throws SQLException 106 { 107 throw new NotImplementedException(this.getClass().getName() 108 + ":execReadStoredProcedure"); 109 } 110 111 114 115 120 public String getInformation() 121 { 122 int size = vdb.getBackends().size(); 124 125 if (size == 0) 126 return "RAIDb-1 Error Checking with Round-Robin Request load balancer: !!!Warning!!! No backend nodes found\n"; 127 else 128 return "RAIDb-1 Error Checking with Round-Robin Request load balancer (" 129 + size + " backends)\n"; 130 } 131 132 135 public String getRaidb1Xml() 136 { 137 return "<" + DatabasesXmlTags.ELT_RAIDb_1ec_RoundRobin + "/>"; 138 } 139 140 } | Popular Tags |