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

Support 'transient' declaration in glu script #42

Closed
ypujante opened this Issue Apr 17, 2011 · 1 comment

Comments

Projects
None yet
1 participant
@ypujante
Member

ypujante commented Apr 17, 2011

There is currently no way to specify that a field in a glu script should not be serialized and made available to ZooKeeper. glu should honor the 'transient' declaration and not serialize a field if it is marked transient.

ypujante added a commit that referenced this issue May 20, 2011

ypujante added a commit that referenced this issue May 20, 2011

ypujante added a commit that referenced this issue May 20, 2011

#42/#47: Added transient script field modifier support test with sugg…
…ested modifications

I added the copyright to the beginning of the file and will implement the feature soon.

ypujante added a commit that referenced this issue May 20, 2011

#42/#47: Implemented feature and test ran successfully
Notes to implementation:
 - Persistent state membership check extracted to method
 - Groovy does not seem to support the transient modifier for properties! The same solution is used as with grails, that is, the static transient = [<list of property names>] property describes what properties should be handled transient.
 - The solution omits all static and transient fields, and all non-serializable values from the persistent state.

ypujante added a commit that referenced this issue May 20, 2011

#42/#47: modifications according to the comments to the previous comm…
…it were implemented

 - convenience method for property value retrieval removed (current method should not cause huge overhead any way)
 - test extended with many more tested values
 - test extended with check for support of transient keyword in Groovy (the test will fail as soon as this is implemented)

ypujante added a commit that referenced this issue May 20, 2011

ypujante added a commit that referenced this issue May 20, 2011

#42: fixed ScriptState.collectScriptPermanentState
* addded test for this code path (checking that right after install
the script state contains the initial values)
* made sure that the state does not contain the key at all (null check is not enough)

ypujante added a commit that referenced this issue May 20, 2011

#42: handle case when object not really serializable
* when object is serializable but not its content...
@ypujante

This comment has been minimized.

Member

ypujante commented May 23, 2011

Implemented with 2.4.0

@ypujante ypujante closed this May 23, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment