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

metaVolumes for #496 #631

Merged
merged 13 commits into from
Oct 24, 2016
Merged

metaVolumes for #496 #631

merged 13 commits into from
Oct 24, 2016

Conversation

julianseeger
Copy link
Collaborator

@julianseeger julianseeger commented Oct 17, 2016

includes the new box prefix choosing algorithm:

  • prefer main prefix (prefix known by the local identity, that is assign to the current account)
  • use first prefix that exists locally and remote and has an index / root
  • use first prefix that exists remote and has an index / root
  • use first prefix that exists locally and remote (and has no index / root => create index)
  • create new prefix (and index)

Prefixes are chosen separately for the types USER and CLIENT

@julianseeger julianseeger changed the title #496 new box prefix choosing algorithm metaVolumes for #496 Oct 18, 2016
@julianseeger julianseeger removed the WIP label Oct 18, 2016
return PrefixChooser(
identityRepository,
{ createNewPrefix(identity, boxClient, identityRepository) },
{ prefix -> hasIndex(identity, prefix, type) },
Copy link
Member

Choose a reason for hiding this comment

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

Using named parameters for this would make it more readable. This way I have to know which callback should do what

@audax
Copy link
Member

audax commented Oct 18, 2016

Make this a default parameter, on android we have to inject the temp directories

= { prefix -> BlockReadBackend("$blockUri/api/v0/files/$prefix/", boxClient) },
val writeBackendFactory: (String) -> StorageWriteBackend
= { prefix -> BlockWriteBackend("$blockUri/api/v0/files/$prefix/", boxClient) }
) : AbstractBoxVolumeFactory(boxClient, identityRepository, directoryFactory) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed

return PrefixChooser(
identityRepository,
{ createNewPrefix(identity, boxClient, identityRepository) },
{ prefix -> hasIndex(identity, prefix, type) },
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addressed

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.

None yet

2 participants