Skip to content

Commit

Permalink
align with previous merge to development
Browse files Browse the repository at this point in the history
  • Loading branch information
pgalbraith committed Dec 13, 2018
1 parent d2e186c commit 2006e22
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions crawler4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.pgalbraith</groupId>
<artifactId>url-detector</artifactId>
<version>${url-detector.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand All @@ -378,11 +383,6 @@
<artifactId>public-suffix-list</artifactId>
<version>${public.suffix.list.version}</version>
</dependency>
<dependency>
<groupId>io.github.pgalbraith</groupId>
<artifactId>url-detector</artifactId>
<version>${url-detector.version}</version>
</dependency>

<!-- Test Dependencies -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@ public DnsResolver getDnsResolver() {

private DnsResolver dnsResolver = new SystemDefaultDnsResolver();

private boolean allowSingleLevelDomain = false;

/*
* number of pages to fetch/process from the database in a single read
*/
private int batchReadSize = 50;

private boolean allowSingleLevelDomain = false;

/**
* Validates the configs specified by this instance.
*
Expand Down Expand Up @@ -681,19 +681,6 @@ public void setRespectNoIndex(boolean respectNoIndex) {
this.respectNoIndex = respectNoIndex;
}

/**
* Number of pages to fetch/process from the database in a single read transaction.
*
* @return the batch read size
*/
public int getBatchReadSize() {
return batchReadSize;
}

public void setBatchReadSize(int batchReadSize) {
this.batchReadSize = batchReadSize;
}

/**
* Are single level domains (e.g. http://localhost) considered valid?
*
Expand All @@ -714,6 +701,19 @@ public void setAllowSingleLevelDomain(boolean allowSingleLevelDomain) {
this.allowSingleLevelDomain = allowSingleLevelDomain;
}

/**
* Number of pages to fetch/process from the database in a single read transaction.
*
* @return the batch read size
*/
public int getBatchReadSize() {
return batchReadSize;
}

public void setBatchReadSize(int batchReadSize) {
this.batchReadSize = batchReadSize;
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand All @@ -740,8 +740,8 @@ public String toString() {
sb.append("Cookie policy: " + getCookiePolicy() + "\n");
sb.append("Respect nofollow: " + isRespectNoFollow() + "\n");
sb.append("Respect noindex: " + isRespectNoIndex() + "\n");
sb.append("Batch read size: " + getBatchReadSize() + "\n");
sb.append("Allow single level domain:" + isAllowSingleLevelDomain() + "\n");
sb.append("Batch read size: " + getBatchReadSize() + "\n");
return sb.toString();
}
}

0 comments on commit 2006e22

Please sign in to comment.