Class EmptyParticipant
- java.lang.Object
-
- com.e1c.g5.v8.snapshot.participant.EmptyParticipant
-
- All Implemented Interfaces:
ISnapshotParticipant
public class EmptyParticipant extends Object implements ISnapshotParticipant
No-op snapshot participant.
-
-
Constructor Summary
Constructors Constructor Description EmptyParticipant()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(org.eclipse.core.resources.IProject project, ISnapshotConfigurator configurator)
Requests the participant to configure snapshot.void
contributeMetadata(org.eclipse.core.resources.IProject project, String entry, OutputStream output)
Requests the participant to contribute metadata for the previously configured metadata entry.int
getFormatVersion()
Gets format version of the snapshot participant.void
restoreMetadata(org.eclipse.core.resources.IProject project, String entry, InputStream input)
Requests the participant to read metadata from snapshot.
-
-
-
Method Detail
-
configure
public void configure(org.eclipse.core.resources.IProject project, ISnapshotConfigurator configurator)
Description copied from interface:ISnapshotParticipant
Requests the participant to configure snapshot. Called some time before snapshot creation and restoration.- Specified by:
configure
in interfaceISnapshotParticipant
- Parameters:
project
- the project for which snapshot is going to be created, cannot benull
configurator
- the configurator to configure snapshot, cannot benull
-
contributeMetadata
public void contributeMetadata(org.eclipse.core.resources.IProject project, String entry, OutputStream output) throws IOException
Description copied from interface:ISnapshotParticipant
Requests the participant to contribute metadata for the previously configured metadata entry.This method is called during snapshot creation once for each metadata entry, which was added by
ISnapshotConfigurator.addMetadataEntry(java.lang.String)
. The order of entries supplied to this method is not specified.Participants must not call
output.close()
.- Specified by:
contributeMetadata
in interfaceISnapshotParticipant
- Parameters:
project
- the project for which snapshot is being created, cannot benull
entry
- the metadata entry name, cannot benull
output
- the output stream to write metadata, cannot benull
- Throws:
IOException
-
restoreMetadata
public void restoreMetadata(org.eclipse.core.resources.IProject project, String entry, InputStream input) throws IOException
Description copied from interface:ISnapshotParticipant
Requests the participant to read metadata from snapshot.This method is called during snapshot restoration once for each metadata entry, which was added to the snapshot by the same participant on creation. The order of entries supplied to this method is not specified.
Participants must not call
input.close()
.- Specified by:
restoreMetadata
in interfaceISnapshotParticipant
- Parameters:
project
- the project for which snapshot is being restored, cannot benull
entry
- the metadata entry name, cannot benull
input
- the input stream to read metadata, cannot benull
- Throws:
IOException
-
getFormatVersion
public int getFormatVersion()
Description copied from interface:ISnapshotParticipant
Gets format version of the snapshot participant. Whenever the format version of a participant does not match the format version stored in a snapshot for this participant, the snapshot is considered invalid and cannot be restored.Snapshot participants are encouraged to smoothly migrate their data. The format version must be increased only if migration is impossible or too heavy.
- Specified by:
getFormatVersion
in interfaceISnapshotParticipant
- Returns:
- the format version of the participant
-
-