This repository has been archived by the owner on Nov 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from datasift/develop
Release sent-items metric
- Loading branch information
Showing
7 changed files
with
90 additions
and
24 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
datasift-writer/src/main/java/com/datasift/connector/writer/BulkReadValues.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.datasift.connector.writer; | ||
|
||
/** | ||
* Container class to return values read. | ||
*/ | ||
public class BulkReadValues { | ||
|
||
/** | ||
* The number of items read. | ||
*/ | ||
private int itemsRead; | ||
|
||
/** | ||
* The data read. | ||
*/ | ||
private String data; | ||
|
||
/** | ||
* Get the number of items read. | ||
* @return the number of items read | ||
*/ | ||
public final int getItemsRead() { | ||
return this.itemsRead; | ||
} | ||
|
||
/** | ||
* Get the data. | ||
* @return the data | ||
*/ | ||
public final String getData() { | ||
return this.data; | ||
} | ||
|
||
/** | ||
* The constructor. | ||
* @param itemsRead the number of items read | ||
* @param data the data | ||
*/ | ||
public BulkReadValues(final int itemsRead, final String data) { | ||
this.itemsRead = itemsRead; | ||
this.data = data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
datasift-writer/src/test/java/com/datasift/connector/writer/TestBulkReadValues.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.datasift.connector.writer; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class TestBulkReadValues { | ||
|
||
@Test | ||
public void can_set_and_get_properties() { | ||
BulkReadValues brv = new BulkReadValues(42, "DATA"); | ||
assertEquals(42, brv.getItemsRead()); | ||
assertEquals("DATA", brv.getData()); | ||
} | ||
} |