Skip to content

Conversation

xhoong
Copy link

@xhoong xhoong commented May 21, 2018

Issue #10 PR, please review.

The idea is to extend RedisExecProvider to hold the executable name and it's server ready pattern.

Copy link
Owner

@fmonniot fmonniot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR !
I found some changes to do, but nothing too dramatic.
Good work on that one 👍


protected abstract Pattern redisReadyPattern();

public abstract void setRedisReadyPat(Pattern redisReadyPat);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to have this set via the Builder pattern, and not be able to mutate this class. Could you remove this method, and set the Pattern via the Builders instead ?

}

@Override
public void setRedisReadyPat(Pattern redisReadyPat) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as before, it should be set in the Builder and passed via the class constructor.


private final Map<OsArchitecture, String> executables = Maps.newHashMap();
private final Map<OsArchitecture, RedisExecutor> executables = Maps.newHashMap();
public final static Pattern REDIS_READY_PATTERN = Pattern.compile(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More of nitpick than anything, but could you name it DEFAULT_REDIS_READY_PATTERN ?
That way we really convey that it's overridable.


import java.util.regex.Pattern;

public class RedisExecutor {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Executor part of the name make me think of java.util.concurrent.Executor, which lead to think it control how the process is run.
Could it be renamed to RedisExecutable (or something like that) ?

@xhoong
Copy link
Author

xhoong commented May 22, 2018

Any chances a publish a release binary soon? Thanks

@xhoong
Copy link
Author

xhoong commented May 22, 2018

Test runs ok on my side, can the check reinitiated? thanks.

@fmonniot fmonniot merged commit ad6d5a2 into fmonniot:master May 22, 2018
@fmonniot
Copy link
Owner

I'll try to make a release this week, thanks for the contribution !

@xhoong xhoong deleted the 10-EnableOverrideRedisReadyPattern branch May 22, 2018 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants