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

Notify SkipperModule of state changes of Jzab #8

Open
EasonLiao opened this issue Sep 24, 2014 · 0 comments
Open

Notify SkipperModule of state changes of Jzab #8

EasonLiao opened this issue Sep 24, 2014 · 0 comments
Assignees

Comments

@EasonLiao
Copy link
Member

In SkipperQueue, we have a pre-applied map object for generating idempotent transactions in preprocess (We apply transaction to it in preprocess callback). But we need to reset the map once Jzab comes back from recovery. We should notify all these modules whenever the state of Jzab changes so
that they can do whatever they want.

Probably we should define the SkipperModule interface to something like :

public abstract class SkipperModule {

  protected final CommandPool commandsPool;

  SkipperModule(CommandPool pool) {
    this.commandsPool = pool;
  }

  abstract ByteBuffer preprocess(ByteBuffer request);

// Callback which will be called once in recovering.
 abstract void recovery();

// Callback which will be called once in broadcasting phase.
 abstract void broadcasting();
}
@EasonLiao EasonLiao self-assigned this Sep 24, 2014
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

No branches or pull requests

1 participant