This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
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 #61 from eo-cqrs/55
CMIG default dir, master `0.0.1`
- Loading branch information
Showing
19 changed files
with
371 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* Copyright (c) 2023 Aliaksei Bialiauski, EO-CQRS | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package io.github.eocqrs.cmig; | ||
|
||
import io.github.eocqrs.cmig.check.CmigKeyspace; | ||
import io.github.eocqrs.cmig.check.StatesTable; | ||
import io.github.eocqrs.cmig.session.Cassandra; | ||
import io.github.eocqrs.cmig.session.InText; | ||
import org.cactoos.Scalar; | ||
|
||
/** | ||
* Preload decorator for {@link Master}. | ||
* | ||
* @author Aliaksei Bialiauski ([email protected]) | ||
* @since 0.0.0 | ||
*/ | ||
public final class Preload implements Scalar<String> { | ||
|
||
/** | ||
* Scalar of Master. | ||
*/ | ||
private final Scalar<String> master; | ||
|
||
/** | ||
* Cassandra. | ||
*/ | ||
private final Cassandra cassandra; | ||
|
||
/** | ||
* Datacenter. | ||
*/ | ||
private final String datacenter; | ||
|
||
/** | ||
* Ctor. | ||
* | ||
* @param mstr Scalar of Master | ||
* @param cs Cassandra | ||
* @param dc Datacenter | ||
*/ | ||
public Preload( | ||
final Scalar<String> mstr, | ||
final Cassandra cs, | ||
final String dc | ||
) { | ||
this.master = mstr; | ||
this.cassandra = cs; | ||
this.datacenter = dc; | ||
} | ||
|
||
@Override | ||
public String value() throws Exception { | ||
new InText( | ||
new CmigKeyspace(this.datacenter), | ||
this.cassandra | ||
).apply(); | ||
new InText( | ||
new StatesTable(), | ||
this.cassandra | ||
).apply(); | ||
return this.master.value(); | ||
} | ||
} |
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
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
Oops, something went wrong.
c61ca7d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
36-b04b7b08
disappeared fromsrc/test/java/io/github/eocqrs/cmig/MasterTest.java
), that's why I closed #47. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.c61ca7d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
36-fd704288
disappeared fromsrc/test/java/io/github/eocqrs/cmig/MasterTest.java
), that's why I closed #48. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.c61ca7d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
48-dfb2ad52
discovered insrc/main/java/io/github/eocqrs/cmig/Master.java
) and submitted as #64. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.c61ca7d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
36-9288a325
discovered insrc/main/java/io/github/eocqrs/cmig/Master.java
) and submitted as #65. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.