Move config-parent to aggregator POM
[lispflowmapping.git] / mappingservice / api / src / main / java / org / opendaylight / lispflowmapping / interfaces / dao / ILispDAO.java
index ef0d9fe9418f1d23b62e7797191121b425989d05..1bc7d1541d23fd7f466385a5e4d02d046ba7a717 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Contextream, Inc. and others.  All rights reserved.
+ * Copyright (c) 2014 Contextream, Inc. and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -9,83 +9,68 @@
 package org.opendaylight.lispflowmapping.interfaces.dao;
 
 import java.util.Map;
-import java.util.concurrent.TimeUnit;
 
 public interface ILispDAO {
 
     /**
      * Put a entry into the DAO.
-     * 
+     *
      * @param key
      *            The entry's key.
      * @param values
      *            The entry's value.
      */
-    public <K> void put(K key, MappingEntry<?>... values);
+    public void put(Object key, MappingEntry<?>... values);
 
     /**
      * Get a specific value from the DAO.
-     * 
+     *
      * @param key
      *            The key of the value to fetch
      * @param valueKey
      *            The value to fetch
      * @return The value from the DAO.
      */
-    public <K, V> V getSpecific(K key, MappingValueKey<V> valueKey);
-
-    /**
-     * Get a specific value from the DAO.
-     * 
-     * @param key
-     *            The key of the value to fetch
-     * @param valueKey
-     *            The value to fetch
-     * @return The value from the DAO.
-     */
-    public <K> Object getSpecific(K key, String valueKey);
+    public Object getSpecific(Object key, String valueKey);
 
     /**
      * Get the entries from the DAO
-     * 
+     *
      * @param key
      *            The key.
      * @return The value from the DAO.
      */
-    public <K> Map<String, ?> get(K key);
+    public Map<String, Object> get(Object key);
 
     /**
-     * Remove an entry from the DAO
-     * 
-     * @param key
-     *            The key of the entry
-     * @return true if success, false otherwise
+     * Enumerate all the entries from the DAO
+     *
+     * @param visitor
+     *            The visitor object.
      */
-    public <K> boolean remove(K key);
+    public void getAll(IRowVisitor visitor);
 
     /**
-     * Clear the DAO and remove all of the entries.
-     */
-    public void clearAll();
-
-    /**
-     * Register a type converter to the DAO
-     * 
-     * @param userType
-     *            The type converter to register
+     * Remove an entry from the DAO
+     *
+     * @param key
+     *            The key of the entry to delete
      */
-    public <UserType, DbType> void register(Class<? extends ILispTypeConverter<UserType, DbType>> userType);
+    public void remove(Object key);
 
     /**
-     * @return The time unit of the DAO cleaner
+     * Remove an entry from the DAO
+     *
+     * @param key
+     *            The key of the entry
+     * @param valueKey
+     *            The value to delete
      */
-    public TimeUnit getTimeUnit();
+    public void removeSpecific(Object key, String valueKey);
 
     /**
-     * Set the time unit of the DAO cleaner
-     * 
-     * @param timeUnit
+     * Clear the DAO and remove all of the entries.
      */
-    public void setTimeUnit(TimeUnit timeUnit);
+    public void removeAll();
 
 }