Skip to content

Instantly share code, notes, and snippets.

@digitalbuddha
Created November 24, 2019 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitalbuddha/e1d077c5ea28421bf8b284a8703386d5 to your computer and use it in GitHub Desktop.
Save digitalbuddha/e1d077c5ea28421bf8b284a8703386d5 to your computer and use it in GitHub Desktop.
Store<Article, Integer> store = StoreBuilder.<Integer, BufferedSource, Article>parsedWithKey()
.fetcher(articleId -> api.getArticles(articleId))
.persister(FileSystemPersister.create(FileSystemFactory.create(context.getFilesDir()), pathResolver))
.parser(GsonParserFactory.createSourceParser(gson, String.class))
.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment