public class PublicPromoCodeLoader
extends java.lang.Object
Constructor and Description |
---|
PublicPromoCodeLoader() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanCodeLoaderForPromotion(java.lang.String promotionId)
Clean the related code loader free for GC
|
static PublicPromoCodeLoader |
getCodeLoaderForPromotion(java.lang.String promotionId)
Get the promotionId related code loader
|
java.lang.String[] |
getNextbatchCodes()
This method will get a batch of the codes and the return String array
size will be the Minimum of targetTotal and batchSize
|
java.lang.Long |
getTargetTotal()
Get the total number of the generated codes
|
void |
setbatchSize(int localbatchSize)
Set batch size
|
static void |
setCodeLoaderForPromotion(java.lang.String promotionId,
PublicPromoCodeLoader cl)
Put the code loader to cache
|
void |
setPromotionCodes(java.lang.String[] newPromotionCodes)
This method is used to set promotion codes.
|
void |
setTargetTotal(java.lang.Long target)
Set the total number of generate codes
|
public void setPromotionCodes(java.lang.String[] newPromotionCodes)
newPromotionCodes
- A String array representing the promotion codes array to be
set.public void setTargetTotal(java.lang.Long target)
target
- the total numberpublic java.lang.Long getTargetTotal()
public void setbatchSize(int localbatchSize)
localbatchSize
- public static PublicPromoCodeLoader getCodeLoaderForPromotion(java.lang.String promotionId)
promotionId
- the target promotionIdpublic static void setCodeLoaderForPromotion(java.lang.String promotionId, PublicPromoCodeLoader cl)
promotionId
- the target promotionIdcl
- the related code loaderpublic static void cleanCodeLoaderForPromotion(java.lang.String promotionId)
promotionId
- the target promotionIdpublic java.lang.String[] getNextbatchCodes()