01: /* Copyright (C) 2003 Internet Archive.
02: *
03: * This file is part of the Heritrix web crawler (crawler.archive.org).
04: *
05: * Heritrix is free software; you can redistribute it and/or modify
06: * it under the terms of the GNU Lesser Public License as published by
07: * the Free Software Foundation; either version 2.1 of the License, or
08: * any later version.
09: *
10: * Heritrix is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: * GNU Lesser Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser Public License
16: * along with Heritrix; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: *
19: * MemUURISet.java
20: * Created on Sep 15, 2003
21: *
22: * $Header$
23: */
24: package org.archive.crawler.util;
25:
26: /**
27: * A UriUniqFilter that doesn't actually provide any uniqueness
28: * filter on presented items: all are passed through.
29: *
30: * @author gojomo
31: *
32: */
33: public class NoopUriUniqFilter extends SetBasedUriUniqFilter {
34:
35: protected synchronized boolean setAdd(CharSequence uri) {
36: return true; // always consider as new
37: }
38:
39: protected synchronized boolean setRemove(CharSequence uri) {
40: return true; // always consider as succeeded
41: }
42:
43: protected synchronized long setCount() {
44: return -1; // return nonsense value
45: }
46:
47: /* (non-Javadoc)
48: * @see org.archive.crawler.util.UriUniqFilterImpl#createUriSet()
49: */
50: protected void createUriSet() {
51: // do nothing
52: }
53:
54: }
|