public abstract class AbstractMigrationService<T>
extends org.exoplatform.social.core.storage.impl.AbstractStorage
| Modifier and Type | Field and Description |
|---|---|
protected org.exoplatform.commons.persistence.impl.EntityManagerService |
entityManagerService |
protected org.exoplatform.commons.api.event.EventManager<T,String> |
eventManager |
protected boolean |
forkStop |
protected org.exoplatform.social.core.storage.api.IdentityStorage |
identityStorage |
protected int |
lastPercent |
protected int |
LIMIT_THRESHOLD |
protected static String |
LIMIT_THRESHOLD_KEY |
protected org.exoplatform.services.log.Log |
LOG |
protected long |
numberFailed |
protected long |
numberSpaceIdentities |
protected long |
numberUserIdentities |
protected String |
process |
| Constructor and Description |
|---|
AbstractMigrationService(org.exoplatform.container.xml.InitParams initParams,
org.exoplatform.social.core.storage.impl.IdentityStorageImpl identityStorage,
org.exoplatform.commons.api.event.EventManager<T,String> eventManager,
org.exoplatform.commons.persistence.impl.EntityManagerService entityManagerService) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMigrationListener(org.exoplatform.services.listener.Listener<T,String> listener) |
protected abstract void |
afterMigration() |
protected abstract void |
beforeMigration() |
protected void |
broadcastListener(T t,
String newId) |
abstract void |
doMigration() |
abstract void |
doRemove() |
void |
endTx(boolean requestClose)
Stops the transaction
|
protected Map<String,org.exoplatform.social.core.chromattic.entity.IdentityEntity> |
getAllIdentityEntity(String providerId) |
List<String> |
getIdentityIds(int offset,
int limit)
Gets the all of ALL IDENTITY IDs
|
protected javax.jcr.NodeIterator |
getIdentityNodes()
Gets the all of ALL USER identity nodes
|
protected javax.jcr.NodeIterator |
getIdentityNodes(long offset,
long limit)
Gets the all of USER identity nodes with given offset and limit;
|
protected int |
getInteger(org.exoplatform.container.xml.InitParams params,
String key,
int defaultValue) |
protected abstract String |
getListenerKey() |
protected long |
getNumberSpaceIdentities() |
protected long |
getNumberUserIdentities() |
protected javax.jcr.NodeIterator |
getSpaceIdentityNodes()
Gets the all of ALL SPACE identity nodes
|
protected javax.jcr.NodeIterator |
getSpaceIdentityNodes(long offset,
long limit)
Gets the all of SPACE identity nodes with given offset and limit;
|
protected String |
getString(org.exoplatform.container.xml.InitParams params,
String key,
String defaultValue) |
protected void |
processLog(String msg,
int size,
int count) |
void |
removeMigrationListener(org.exoplatform.services.listener.Listener<T,String> listener) |
void |
start() |
protected boolean |
startTx()
Starts the transaction if it isn't existing
|
void |
stop() |
_findById, _findByPath, _getMixin, _hasMixin, _removeById, _removeMixin, _skip, getProviderRoot, getSession, getSpaceRoot, getStatus, isJcrProperty, lifecycleLookup, node, nodes, nodes, startSynchronization, stopSynchronizationprotected org.exoplatform.services.log.Log LOG
protected static final String LIMIT_THRESHOLD_KEY
protected final org.exoplatform.social.core.storage.api.IdentityStorage identityStorage
protected final org.exoplatform.commons.persistence.impl.EntityManagerService entityManagerService
protected boolean forkStop
protected int LIMIT_THRESHOLD
protected String process
protected int lastPercent
protected long numberFailed
protected long numberUserIdentities
protected long numberSpaceIdentities
public AbstractMigrationService(org.exoplatform.container.xml.InitParams initParams,
org.exoplatform.social.core.storage.impl.IdentityStorageImpl identityStorage,
org.exoplatform.commons.api.event.EventManager<T,String> eventManager,
org.exoplatform.commons.persistence.impl.EntityManagerService entityManagerService)
public void addMigrationListener(org.exoplatform.services.listener.Listener<T,String> listener)
public void removeMigrationListener(org.exoplatform.services.listener.Listener<T,String> listener)
public void start()
public void stop()
protected Map<String,org.exoplatform.social.core.chromattic.entity.IdentityEntity> getAllIdentityEntity(String providerId)
protected void processLog(String msg, int size, int count)
protected javax.jcr.NodeIterator getIdentityNodes()
public List<String> getIdentityIds(int offset, int limit)
offset - the start indexlimit - max number item to loadprotected javax.jcr.NodeIterator getIdentityNodes(long offset,
long limit)
offset - the start indexlimit - max nodes to loadprotected long getNumberUserIdentities()
protected javax.jcr.NodeIterator getSpaceIdentityNodes(long offset,
long limit)
offset - the start indexlimit - max nodes to loadprotected long getNumberSpaceIdentities()
protected javax.jcr.NodeIterator getSpaceIdentityNodes()
protected int getInteger(org.exoplatform.container.xml.InitParams params,
String key,
int defaultValue)
protected String getString(org.exoplatform.container.xml.InitParams params, String key, String defaultValue)
protected boolean startTx()
public void endTx(boolean requestClose)
requestClose - true if need to do really commentprotected abstract String getListenerKey()
Copyright © 2003–2016 eXo Platform SAS. All rights reserved.