Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-1938 - Don't validate default conf each time named is parsed #1025

Closed
wants to merge 1 commit into from

Conversation

vblagoje
Copy link

@galderz
Copy link
Member

galderz commented Mar 23, 2012

I'll handle this...

@galderz
Copy link
Member

galderz commented Mar 23, 2012

I still need to look into the code, but what's the 5.1.x branch for this? Please name it in the comment

@@ -57,6 +58,14 @@ public ConfigurationBuilder() {
this.unsafe = new UnsafeConfigurationBuilder(this);
}

public boolean isValidateBeforeBuild() {
Copy link
Member

Choose a reason for hiding this comment

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

We should strive to keep *Configuration and *ConfigurationBuilder classes as clean as possible with only methods that are relevant for configuration building. This methods are not relevant to the user, they do not configure any particular functionality in Infinispan. This really is an internal flag for us to know whether we need to validate the config or not.

So, -1 to these methods being public. If possible, I'd get rid of them too actually.

Having thought a bit further about this, I'd rather get rid of validateBeforeBuild and have an overloaded build(boolean validate) method in ConfigurationBuilder, hopefully in protected/default visibility. ConfigurationBuilderHolder would call dfb.build(false), and the existing build() impl would call the internal build(true). This avoids unnecessary validateBeforeBuild instance variable. WDYT?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah cool! I like it as well! So the overloaded method is not exposed on the interface then?

@vblagoje
Copy link
Author

Have a look again Galder, could not make the method protected/default visibility unfortunately...

@galderz
Copy link
Member

galderz commented Mar 26, 2012

Thx Vladimir, that looks better :)

@galderz galderz closed this Mar 26, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants