-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding optional Configuration to Machine that can be used to enable a… (
#125) * Adding optional Configuration to Machine that can be used to enable additional NameState re-use where each key subsequence has a single NameState * Updating readme, performing rename, adding benchmark test * Moving Configuration builder into GenericMachine/Machine * Bumping version
- Loading branch information
Showing
10 changed files
with
277 additions
and
3 deletions.
There are no files selected for viewing
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
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
18 changes: 18 additions & 0 deletions
18
src/main/software/amazon/event/ruler/GenericMachineConfiguration.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,18 @@ | ||
package software.amazon.event.ruler; | ||
|
||
/** | ||
* Configuration for a GenericMachine. For descriptions of the options, see GenericMachine.Builder. | ||
*/ | ||
class GenericMachineConfiguration { | ||
|
||
private final boolean additionalNameStateReuse; | ||
|
||
GenericMachineConfiguration(boolean additionalNameStateReuse) { | ||
this.additionalNameStateReuse = additionalNameStateReuse; | ||
} | ||
|
||
boolean isAdditionalNameStateReuse() { | ||
return additionalNameStateReuse; | ||
} | ||
} | ||
|
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
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
19 changes: 19 additions & 0 deletions
19
src/test/software/amazon/event/ruler/GenericMachineConfigurationTest.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,19 @@ | ||
package software.amazon.event.ruler; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertFalse; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
public class GenericMachineConfigurationTest { | ||
|
||
@Test | ||
public void testAdditionalNameStateReuseTrue() { | ||
assertTrue(new GenericMachineConfiguration(true).isAdditionalNameStateReuse()); | ||
} | ||
|
||
@Test | ||
public void testAdditionalNameStateReuseFalse() { | ||
assertFalse(new GenericMachineConfiguration(false).isAdditionalNameStateReuse()); | ||
} | ||
} |
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
Oops, something went wrong.