public abstract class BlenderRecipe extends Object implements Comparable<BlenderRecipe>
Constructor and Description |
---|
BlenderRecipe() |
Modifier and Type | Method and Description |
---|---|
static void |
addRecipe(String identifier,
BlenderRecipe add)
Adds a recipe to the specified recipe list.
|
abstract RoutingCombo |
applyRecipe(Set<IdentityStoreBlock> anonSet,
IdentityStoreBlock from,
IdentityStoreBlock to)
Creates a routing block with the given parameters.
|
static void |
clearRecipes(String identifier)
Remove all recipes from the specified list of recipes.
|
int |
compareTo(BlenderRecipe o) |
static BlenderRecipe |
getRecipe(String identifier,
Set<IdentityStoreBlock> anonSet)
Get a recipe from the specified recipe set.
|
abstract boolean |
isAppliable(Set<IdentityStoreBlock> anonSet)
Tests if the given recipe may be applied to the anon set available.
|
public static BlenderRecipe getRecipe(String identifier, Set<IdentityStoreBlock> anonSet) throws IOException
Get a recipe from the specified recipe set.
identifier
- the name of the recipe setanonSet
- the anonymity set to be usedIOException
- if no candidates can be foundpublic static void clearRecipes(String identifier)
Remove all recipes from the specified list of recipes.
identifier
- the recipe list identifier (null for default list)public static void addRecipe(String identifier, BlenderRecipe add)
Adds a recipe to the specified recipe list.
identifier
- the name of the recipe list (null for default)add
- the recipe to be addedpublic abstract boolean isAppliable(Set<IdentityStoreBlock> anonSet)
Tests if the given recipe may be applied to the anon set available.
anonSet
- the currently available anonymity setpublic abstract RoutingCombo applyRecipe(Set<IdentityStoreBlock> anonSet, IdentityStoreBlock from, IdentityStoreBlock to) throws IOException
Creates a routing block with the given parameters.
anonSet
- the anonymity set to be usedfrom
- the sending node addressto
- the receiving node addressIOException
- if a problem arises when creating the blockpublic int compareTo(BlenderRecipe o)
compareTo
in interface Comparable<BlenderRecipe>
Copyright © 2023. All rights reserved.