|
GigaSpaces - Open Spaces | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openspaces.persistency.hibernate.iterator.AbstractChunkDataIterator
public abstract class AbstractChunkDataIterator
A base class that accespts a batch size and will create several iterators on the given entity by chunking it into batch size chuncks, each iterator will iterate only on the given chunk.
Field Summary | |
---|---|
protected int |
chunkSize
|
protected String |
entityName
|
protected int |
fetchSize
|
protected String |
hQuery
|
protected boolean |
perfromOrderById
|
protected org.hibernate.SessionFactory |
sessionFactory
|
protected com.j_spaces.core.client.SQLQuery |
sqlQuery
|
Constructor Summary | |
---|---|
AbstractChunkDataIterator(com.j_spaces.core.client.SQLQuery sqlQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int chunkSize)
Constructs a scrollable iterator over the given GigaSpaces SQLQuery . |
|
AbstractChunkDataIterator(String entityName,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int chunkSize)
Constructs a scrollable iterator over the given entity name. |
|
AbstractChunkDataIterator(String hQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
int chunkSize)
Constructs a scrollable iterator over the given hibernate query string. |
Method Summary | |
---|---|
void |
close()
|
protected abstract com.gigaspaces.datasource.DataIterator |
createIteartorByEntityName(String entityName,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int from,
int size)
|
protected abstract com.gigaspaces.datasource.DataIterator |
createIteartorByHibernateQuery(String hQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
int from,
int size)
|
protected abstract com.gigaspaces.datasource.DataIterator |
createIteartorBySQLQuery(com.j_spaces.core.client.SQLQuery sqlQuery,
org.hibernate.SessionFactory sessionFactory,
int fetchSize,
boolean performOrderById,
int from,
int size)
|
boolean |
hasNext()
|
com.gigaspaces.datasource.DataIterator[] |
iterators()
Returns the underlying iterators. |
Object |
next()
|
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String entityName
protected final com.j_spaces.core.client.SQLQuery sqlQuery
protected final String hQuery
protected final org.hibernate.SessionFactory sessionFactory
protected final boolean perfromOrderById
protected final int fetchSize
protected final int chunkSize
Constructor Detail |
---|
public AbstractChunkDataIterator(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int chunkSize)
entityName
- The entity name to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollabale result setperformOrderById
- Should the query perform order by id or notchunkSize
- The size of the chunks the entity table will be broken topublic AbstractChunkDataIterator(com.j_spaces.core.client.SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int chunkSize)
SQLQuery
.
sqlQuery
- The SQLQuery
to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollabale result setperformOrderById
- Should the query perform order by id or notchunkSize
- The size of the chunks the entity table will be broken topublic AbstractChunkDataIterator(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int chunkSize)
hQuery
- The hiberante query string to scroll oversessionFactory
- The session factory to use to construct the sessionfetchSize
- The fetch size of the scrollabale result setchunkSize
- The size of the chunks the entity table will be broken toMethod Detail |
---|
public com.gigaspaces.datasource.DataIterator[] iterators()
MultiDataIterator
iterators
in interface MultiDataIterator
public boolean hasNext()
hasNext
in interface Iterator
public Object next()
next
in interface Iterator
public void remove()
remove
in interface Iterator
public void close()
close
in interface com.gigaspaces.datasource.DataIterator
protected abstract com.gigaspaces.datasource.DataIterator createIteartorByEntityName(String entityName, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
protected abstract com.gigaspaces.datasource.DataIterator createIteartorBySQLQuery(com.j_spaces.core.client.SQLQuery sqlQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, boolean performOrderById, int from, int size)
protected abstract com.gigaspaces.datasource.DataIterator createIteartorByHibernateQuery(String hQuery, org.hibernate.SessionFactory sessionFactory, int fetchSize, int from, int size)
|
GigaSpaces - Open Spaces | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |