Package org.geotools.data.store
Class DiffTransactionState
- Object
-
- DiffTransactionState
-
- All Implemented Interfaces:
Transaction.State
public class DiffTransactionState extends Object implements Transaction.State
Transaction state responsible for holding an in memoryDiff
of any modifications.
-
-
Field Summary
Fields Modifier and Type Field Description protected Diff
diff
protected ContentState
state
ContentState for this transaction used to hold information for FeatureReader implementationsprotected Transaction
transaction
The transaction (ie session) associated with this state
-
Constructor Summary
Constructors Modifier Constructor Description DiffTransactionState(ContentState state)
Transaction state responsible for holding an in memoryDiff
.protected
DiffTransactionState(ContentState state, Diff diff)
Transaction state responsible for holding an in memoryDiff
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuthorization(String AuthID)
Call back used for Transaction.setAuthorization()void
commit()
Call back used for Transaction.commit()FeatureWriter<SimpleFeatureType,SimpleFeature>
diffWriter(ContentFeatureStore contentFeatureStore, FeatureReader<SimpleFeatureType,SimpleFeature> reader)
Provides a wrapper on the provided reader which gives a diff writer.Diff
getDiff()
Access the in memory Diff.void
rollback()
Call back used for Transaction.rollback()void
setTransaction(Transaction transaction)
Provides configuration information for Transaction.State
-
-
-
Field Detail
-
diff
protected Diff diff
-
transaction
protected Transaction transaction
The transaction (ie session) associated with this state
-
state
protected ContentState state
ContentState for this transaction used to hold information for FeatureReader implementations
-
-
Constructor Detail
-
DiffTransactionState
public DiffTransactionState(ContentState state)
Transaction state responsible for holding an in memoryDiff
.- Parameters:
state
- ContentState for the transaction
-
DiffTransactionState
protected DiffTransactionState(ContentState state, Diff diff)
Transaction state responsible for holding an in memoryDiff
.- Parameters:
state
- ContentState for the transaction
-
-
Method Detail
-
getDiff
public Diff getDiff()
Access the in memory Diff.- Returns:
- in memory diff.
-
setTransaction
public void setTransaction(Transaction transaction)
Description copied from interface:Transaction.State
Provides configuration information for Transaction.StatesetTransaction is called with non null
transaction
when Transaction.State isputState
into a Transaction. This tranasction will be used to determine correct event notification.setTransaction is called with
null
when removeState is called (usually during Transaction.close() ).- Specified by:
setTransaction
in interfaceTransaction.State
-
commit
public void commit() throws IOException
Description copied from interface:Transaction.State
Call back used for Transaction.commit()- Specified by:
commit
in interfaceTransaction.State
- Throws:
IOException
-
rollback
public void rollback() throws IOException
Description copied from interface:Transaction.State
Call back used for Transaction.rollback()- Specified by:
rollback
in interfaceTransaction.State
- Throws:
IOException
-
addAuthorization
public void addAuthorization(String AuthID) throws IOException
Description copied from interface:Transaction.State
Call back used for Transaction.setAuthorization()- Specified by:
addAuthorization
in interfaceTransaction.State
- Throws:
IOException
-
diffWriter
public FeatureWriter<SimpleFeatureType,SimpleFeature> diffWriter(ContentFeatureStore contentFeatureStore, FeatureReader<SimpleFeatureType,SimpleFeature> reader)
Provides a wrapper on the provided reader which gives a diff writer.- Parameters:
contentFeatureStore
- ContentFeatureStorereader
- FeatureReader requiring diff support- Returns:
- FeatureWriter with diff support
-
-