|
|
|
@ -24,17 +24,16 @@
|
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
import java.util.ConcurrentModificationException;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.Iterator;
|
|
|
|
|
import java.util.Locale;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Map.Entry;
|
|
|
|
|
import java.util.TreeSet;
|
|
|
|
|
import java.util.concurrent.LinkedBlockingQueue;
|
|
|
|
|
|
|
|
|
|
import net.yacy.cora.date.GenericFormatter;
|
|
|
|
|
import net.yacy.cora.protocol.Domains;
|
|
|
|
|
import net.yacy.cora.protocol.HeaderFramework;
|
|
|
|
|
import net.yacy.cora.protocol.RequestHeader;
|
|
|
|
@ -49,8 +48,6 @@ import net.yacy.server.serverAccessTracker.Track;
|
|
|
|
|
|
|
|
|
|
public class AccessTracker_p {
|
|
|
|
|
|
|
|
|
|
private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US);
|
|
|
|
|
|
|
|
|
|
private static Collection<Track> listclone (final Collection<Track> m) {
|
|
|
|
|
final Collection<Track> accessClone = new LinkedBlockingQueue<Track>();
|
|
|
|
|
try {
|
|
|
|
@ -113,7 +110,7 @@ public class AccessTracker_p {
|
|
|
|
|
while (ii.hasNext()) {
|
|
|
|
|
entry = ii.next();
|
|
|
|
|
prop.putHTML("page_list_" + entCount + "_host", host);
|
|
|
|
|
prop.put("page_list_" + entCount + "_date", SimpleFormatter.format(new Date(entry.getTime())));
|
|
|
|
|
prop.put("page_list_" + entCount + "_date", GenericFormatter.SIMPLE_FORMATTER.format(new Date(entry.getTime())));
|
|
|
|
|
prop.putHTML("page_list_" + entCount + "_path", entry.getPath());
|
|
|
|
|
entCount++;
|
|
|
|
|
}
|
|
|
|
@ -129,7 +126,7 @@ public class AccessTracker_p {
|
|
|
|
|
while (ii.hasNext()) {
|
|
|
|
|
entry = ii.next();
|
|
|
|
|
prop.putHTML("page_list_" + entCount + "_host", host);
|
|
|
|
|
prop.put("page_list_" + entCount + "_date", SimpleFormatter.format(new Date(entry.getTime())));
|
|
|
|
|
prop.put("page_list_" + entCount + "_date", GenericFormatter.SIMPLE_FORMATTER.format(new Date(entry.getTime())));
|
|
|
|
|
prop.putHTML("page_list_" + entCount + "_path", entry.getPath());
|
|
|
|
|
entCount++;
|
|
|
|
|
}
|
|
|
|
@ -163,7 +160,7 @@ public class AccessTracker_p {
|
|
|
|
|
prop.put("page_list_" + m + "_dark", ((dark) ? 1 : 0) );
|
|
|
|
|
dark =! dark;
|
|
|
|
|
prop.putHTML("page_list_" + m + "_host", query.host);
|
|
|
|
|
prop.put("page_list_" + m + "_date", SimpleFormatter.format(new Date(query.starttime)));
|
|
|
|
|
prop.put("page_list_" + m + "_date", GenericFormatter.SIMPLE_FORMATTER.format(new Date(query.starttime)));
|
|
|
|
|
prop.put("page_list_" + m + "_timestamp", query.starttime);
|
|
|
|
|
if (page == 2) {
|
|
|
|
|
// local search
|
|
|
|
@ -254,7 +251,7 @@ public class AccessTracker_p {
|
|
|
|
|
final Iterator<Long> ii = handles.iterator();
|
|
|
|
|
while (ii.hasNext()) {
|
|
|
|
|
final Long timestamp = ii.next();
|
|
|
|
|
prop.put("page_list_" + m + "_dates_" + dateCount + "_date", SimpleFormatter.format(new Date(timestamp.longValue())));
|
|
|
|
|
prop.put("page_list_" + m + "_dates_" + dateCount + "_date", GenericFormatter.SIMPLE_FORMATTER.format(new Date(timestamp.longValue())));
|
|
|
|
|
prop.put("page_list_" + m + "_dates_" + dateCount + "_timestamp", timestamp.toString());
|
|
|
|
|
dateCount++;
|
|
|
|
|
}
|
|
|
|
|