*/
@Override
public void addDomain(String domain) throws DomainListException {
String lowerCasedDomain = domain.toLowerCase();
if (containsDomain(lowerCasedDomain)) {
throw new DomainListException(lowerCasedDomain + " already exists.");
}
HTable table = null;
try {
table = TablePool.getInstance().getDomainlistTable();
Put put = new Put(Bytes.toBytes(lowerCasedDomain));
put.add(HDomainList.COLUMN_FAMILY_NAME, HDomainList.COLUMN.DOMAIN, null);
table.put(put);
table.flushCommits();
} catch (IOException e) {
log.error("Error while adding domain in HBase", e);
throw new DomainListException("Error while adding domain in HBase", e);
} finally {
if (table != null) {
try {
table.close();
} catch (IOException e) {