org.eclipse.emf.emfstore.internal.server.model.versioning.impl.persistent
Class FileBasedOperationIterable

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.model.versioning.impl.persistent.FileBasedOperationIterable
All Implemented Interfaces:
ESCloseableIterable<AbstractOperation>

public class FileBasedOperationIterable
extends Object
implements ESCloseableIterable<AbstractOperation>

Enables to iterate through all operations that are saved within an underlying operations file.
NOTE: Callers must call close when they are finished.

Since:
1.5
Author:
emueller

Constructor Summary
FileBasedOperationIterable(String operationsFilePath, Direction direction)
          Constructor.
 
Method Summary
 void close()
          Closes this Iterable.
 Iterable<AbstractOperation> iterable()
          Returns an Iterable that can be iterated over.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileBasedOperationIterable

public FileBasedOperationIterable(String operationsFilePath,
                                  Direction direction)
Constructor.

Parameters:
operationsFilePath - the absolute path to the underlying operations file
direction - the read Direction
Method Detail

iterable

public Iterable<AbstractOperation> iterable()
Returns an Iterable that can be iterated over.

Specified by:
iterable in interface ESCloseableIterable<AbstractOperation>
Returns:
an Iterable to iterate over
See Also:
Iterable.iterator()

close

public void close()
Closes this Iterable.

Specified by:
close in interface ESCloseableIterable<AbstractOperation>
See Also:
ESCloseableIterable.close()


Copyright © 2016. All Rights Reserved.