Class StandardRequestSystemCrafterJobDataStore
java.lang.Object
com.minecolonies.core.colony.requestsystem.data.StandardRequestSystemCrafterJobDataStore
- All Implemented Interfaces:
IDataStore,IRequestSystemCrafterJobDataStore
public class StandardRequestSystemCrafterJobDataStore
extends Object
implements IRequestSystemCrafterJobDataStore
Crafter data store.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFactory to work with the datastore. -
Constructor Summary
ConstructorsConstructorDescriptionStandard constructor to initialize from zero.StandardRequestSystemCrafterJobDataStore(IToken<?> id, LinkedList<IToken<?>> queue, List<IToken<?>> tasks) Constructor to create the data store. -
Method Summary
Modifier and TypeMethodDescriptionThe list of tasks that is assigned to this worker, but for which the RS is still collecting resources.IToken<?> getId()Method to get theITokenused to identify thisIDataStore.LinkedList<IToken<?>> getQueue()The task queue that needs to be processed by the worker.voidMethod to set theITokenused to identify thisIDataStore.
-
Constructor Details
-
StandardRequestSystemCrafterJobDataStore
public StandardRequestSystemCrafterJobDataStore(IToken<?> id, LinkedList<IToken<?>> queue, List<IToken<?>> tasks) Constructor to create the data store.- Parameters:
id- the id of it.queue- the queue to start with.tasks- the task.
-
StandardRequestSystemCrafterJobDataStore
public StandardRequestSystemCrafterJobDataStore()Standard constructor to initialize from zero.
-
-
Method Details
-
getQueue
Description copied from interface:IRequestSystemCrafterJobDataStoreThe task queue that needs to be processed by the worker.- Specified by:
getQueuein interfaceIRequestSystemCrafterJobDataStore- Returns:
- The task queue of the worker
-
getAssignedTasks
Description copied from interface:IRequestSystemCrafterJobDataStoreThe list of tasks that is assigned to this worker, but for which the RS is still collecting resources.- Specified by:
getAssignedTasksin interfaceIRequestSystemCrafterJobDataStore- Returns:
- The assigned tasks list.
-
getId
Description copied from interface:IDataStoreMethod to get theITokenused to identify thisIDataStore.- Specified by:
getIdin interfaceIDataStore- Returns:
- The
ITokenfor thisIDataStore
-
setId
Description copied from interface:IDataStoreMethod to set theITokenused to identify thisIDataStore. Used during creation to setup the initial Id.- Specified by:
setIdin interfaceIDataStore- Parameters:
id- The new Id.
-