Skip to content

Instantly share code, notes, and snippets.

@andresrc
Created August 17, 2012 17:14
Show Gist options
  • Save andresrc/3380724 to your computer and use it in GitHub Desktop.
Save andresrc/3380724 to your computer and use it in GitHub Desktop.
Bocas entries
public class BocasEntry {
/** Returns the entry key. */
public ByteString getKey();
/** Returns the entry value. */
public BocasValue getValue();
/**
* Turns this entry into a loaded entry.
* @throws BocasException if unable to read the value payload.
*/
public LoadedBocasEntry load();
/**
* Turns this entry into a direct entry.
* @throws BocasException if unable to read the value payload.
*/
public DirectBocasEntry direct();
}
public class LoadedBocasEntry extends BocasEntry {
@Override
public LoadedBocasValue getValue();
}
public class DirectBocasEntry extends BocasEntry {
@Override
public DirectBocasValue getValue();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment