org.eclipse.emf.emfstore.internal.server.core.subinterfaces
Class ChangePackageFragmentProviderAdapter
java.lang.Object
org.eclipse.emf.common.notify.impl.AdapterImpl
org.eclipse.emf.emfstore.internal.server.core.subinterfaces.ChangePackageFragmentProviderAdapter
- All Implemented Interfaces:
- org.eclipse.emf.common.notify.Adapter, org.eclipse.emf.common.notify.Adapter.Internal
public class ChangePackageFragmentProviderAdapter
- extends org.eclipse.emf.common.notify.impl.AdapterImpl
Adapter that is supposed to be attached to a session and split incoming complete change packages
into single fragments.
- Author:
- emueller
Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
org.eclipse.emf.common.notify.Adapter.Internal |
Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
getTarget, isAdapterForType, notifyChanged, setTarget, unsetTarget |
ChangePackageFragmentProviderAdapter
public ChangePackageFragmentProviderAdapter()
addAsFragments
public void addAsFragments(String proxyId,
AbstractChangePackage changePackage)
- Splits the given change package into fragments and stores them.
- Parameters:
proxyId
- an ID that needs to be unique for the change package to be splitted.
Necessary when there are multiple change packages available per projectchangePackage
- the change package to be splitted
getFragment
public List<AbstractOperation> getFragment(String proxyId,
int fragmentIndex)
throws ESException
- Returns a single fragment.
- Parameters:
proxyId
- ID that identifies a list of fragmentsfragmentIndex
- the index of the fragment to be returned
- Returns:
- the fragment
- Throws:
ESException
- in case no fragments for the given proxy ID are present
getFragmentSize
public int getFragmentSize(String proxyId)
- Returns the number of fragments for the given ID.
- Parameters:
proxyId
- the ID identifying the list of change package fragments
- Returns:
- the number of available fragments
markAsConsumed
public void markAsConsumed(String proxyId)
- Removes the fragments that belong to given ID.
- Parameters:
proxyId
- identifies the change package fragments to be removed
Copyright © 2016. All Rights Reserved.