X Tutup
Skip to content

Improve instantiation and serialization of Bind#70

Merged
marcuslinke merged 2 commits intodocker-java:masterfrom
albers:bind
Oct 7, 2014
Merged

Improve instantiation and serialization of Bind#70
marcuslinke merged 2 commits intodocker-java:masterfrom
albers:bind

Conversation

@albers
Copy link
Copy Markdown
Contributor

@albers albers commented Oct 7, 2014

This PR covers two topics:

  • Introduces Bind.toString() so that serializing of Bind can be handled the same way as in Volume.
  • As boolean arguments lead to non-intuitive and hard to memorize API (was this argument isReadOnly or isReadWrite?), a new enum AccessMode was introduced for use in the Bind's constructor. This also improves parsing and serialization. The new API more closely resembles the Docker CLI syntax, which does not have a boolean notion of access mode.

The boolean constructor and Bind.isReadOnly() were kept for backwards compatibility.
I would like to amend this PR to remove them, though. What do you think of this?

albers added 2 commits October 7, 2014 16:39
This also changes the serialization in Binds.Serializer to always
include the access mode. This is no problem in Docker API.
marcuslinke added a commit that referenced this pull request Oct 7, 2014
Improve instantiation and serialization of Bind
@marcuslinke marcuslinke merged commit ee6248d into docker-java:master Oct 7, 2014
@marcuslinke
Copy link
Copy Markdown
Contributor

Thanks!

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

X Tutup