Author: kwright
Date: Wed Nov 27 01:52:45 2013
New Revision: 1545904
URL: http://svn.apache.org/r1545904
Log:
Bins are double values in current implementation; do the same thing in new
implementation.
Modified:
manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/bins/BinManager.java
manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IBinManager.java
Modified:
manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/bins/BinManager.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/bins/BinManager.java?rev=1545904&r1=1545903&r2=1545904&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/bins/BinManager.java
(original)
+++
manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/bins/BinManager.java
Wed Nov 27 01:52:45 2013
@@ -70,7 +70,7 @@ public class BinManager extends org.apac
{
HashMap map = new HashMap();
map.put(binNameField,new
ColumnDescription("VARCHAR(255)",true,true,null,null,false));
- map.put(binCounterField,new
ColumnDescription("BIGINT",false,false,null,null,false));
+ map.put(binCounterField,new
ColumnDescription("FLOAT",false,false,null,null,false));
performCreate(map,null);
}
else
@@ -109,7 +109,7 @@ public class BinManager extends org.apac
*@return the counter value.
*/
@Override
- public long getIncrementBinValue(String binName, long newBinValue)
+ public double getIncrementBinValue(String binName, double newBinValue)
throws ManifoldCFException
{
// SELECT FOR UPDATE/MODIFY is the most common path
@@ -120,10 +120,10 @@ public class BinManager extends org.apac
if (result.getRowCount() > 0)
{
IResultRow row = result.getRow(0);
- Long value = (Long)row.getValue(binCounterField);
- long rval = value.longValue();
+ Double value = (Double)row.getValue(binCounterField);
+ double rval = value.doubleValue();
HashMap map = new HashMap();
- map.put(binCounterField,new Long(rval+1L));
+ map.put(binCounterField,new Double(rval+1.0));
performUpdate(map," WHERE "+query,params,null);
return rval;
}
@@ -131,7 +131,7 @@ public class BinManager extends org.apac
{
HashMap map = new HashMap();
map.put(binNameField,binName);
- map.put(binCounterField,new Long(newBinValue+1L));
+ map.put(binCounterField,new Double(newBinValue+1.0));
performInsert(map,null);
return newBinValue;
}
Modified:
manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IBinManager.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IBinManager.java?rev=1545904&r1=1545903&r2=1545904&view=diff
==============================================================================
---
manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IBinManager.java
(original)
+++
manifoldcf/branches/CONNECTORS-781/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IBinManager.java
Wed Nov 27 01:52:45 2013
@@ -48,7 +48,7 @@ public interface IBinManager
* returned; what will be stored will be that value + 1.
*@return the counter value.
*/
- public long getIncrementBinValue(String binName, long newBinValue)
+ public double getIncrementBinValue(String binName, double newBinValue)
throws ManifoldCFException;
}