Package io.atomix.primitive
Interface PrimitiveRegistry
- All Known Subinterfaces:
ManagedPrimitiveRegistry
public interface PrimitiveRegistry
Primitive registry.
-
Method Summary
Modifier and Type Method Description CompletableFuture<PrimitiveInfo>
createPrimitive(String name, PrimitiveType type)
Creates a new distributed primitive.CompletableFuture<Void>
deletePrimitive(String name)
Deletes the given distributed primitive.PrimitiveInfo
getPrimitive(String name)
Returns the info for a single primitive.Collection<PrimitiveInfo>
getPrimitives()
Returns a collection of open primitives.Collection<PrimitiveInfo>
getPrimitives(PrimitiveType primitiveType)
Returns a collection of open primitives of the given type.
-
Method Details
-
createPrimitive
Creates a new distributed primitive.- Parameters:
name
- the primitive nametype
- the primitive type- Returns:
- a future to be completed with the primitive info
-
deletePrimitive
Deletes the given distributed primitive.- Parameters:
name
- the primitive name- Returns:
- a future to be completed once the primitive info has been deleted
-
getPrimitives
Collection<PrimitiveInfo> getPrimitives()Returns a collection of open primitives.- Returns:
- a collection of open primitives
-
getPrimitives
Returns a collection of open primitives of the given type.- Parameters:
primitiveType
- the primitive type- Returns:
- a collection of open primitives of the given type
-
getPrimitive
Returns the info for a single primitive.- Parameters:
name
- the primitive name- Returns:
- the primitive info
-