Class SmartIdGenerator
java.lang.Object
com.atlassian.confluence.impl.backuprestore.restore.dao.SmartIdGenerator
Allows to generate ids in bunches. Usually, generates more ids than required and stored them in memory.
 It allows to avoid contacting the DB again for the consecutive requests.
 Cached ids for different generators are stored independently.
- Since:
- 9.0.0
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intIds should be retrieved immediately.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongenerateIds(org.hibernate.id.IdentifierGenerator identifierGenerator, Object fakeObject, int numberOfIdsToGenerate) 
- 
Field Details- 
TIMEOUT_LOCK_MINUTESpublic static final int TIMEOUT_LOCK_MINUTESIds should be retrieved immediately. If ids cannot be retrieved in 10 min, it makes sense to throw an exception and fail the job, so the system can heal itself.- See Also:
 
 
- 
- 
Constructor Details- 
SmartIdGenerator
 
- 
- 
Method Details- 
generateIdspublic Collection<Object> generateIds(org.hibernate.id.IdentifierGenerator identifierGenerator, Object fakeObject, int numberOfIdsToGenerate) 
 
-