public abstract class SettingsNegotiator extends Object
ConnectionSettingsNegotiator
and SessionSettingsNegotiator
. The
former one is in charge of all Entry
objects with connection-specific parameters, the latter is in charge of
all session-wide parameter Entry
objects.Modifier and Type | Field and Description |
---|---|
protected List<Entry> |
backUpEntries
A back-up copy of the last consistent state of all elements in
entries or null . |
protected List<Entry> |
entries
All
Entry objects managed by this SettingsNegotiator . |
Constructor and Description |
---|
SettingsNegotiator()
The abstract constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
backUpEntries()
Stores an exact copy of
entries in backUpEntries . |
abstract boolean |
checkConstraints()
Checks constraints that cannot be checked at the
Entry level, e.g. |
protected void |
commitOrRollBackChanges(boolean commitChanges)
This method must be called at the end of a parameter negotiation task, either to roll back any changes that must
not take effect, or in order to ensure that consecutive negotiations are carried out correctly.
|
protected static List<Entry> |
copy(List<Entry> entries)
|
protected abstract void |
initializeEntries()
Adds a properly initialized
Entry object to entries for every parameter managed by this
SettingsNegotiator . |
protected List<Entry> entries
Entry
objects managed by this SettingsNegotiator
.
These elements might change consecutively during parameter negotiations.
public SettingsNegotiator()
Calls initializeEntries()
.
protected static final List<Entry> copy(List<Entry> entries)
entries
- the List
to copyprotected final void backUpEntries()
entries
in backUpEntries
.protected final void commitOrRollBackChanges(boolean commitChanges)
commitChanges
- true
if and only if the negotiated changes to the elements in entries
are to be remembered.protected abstract void initializeEntries()
Entry
object to entries
for every parameter managed by this
SettingsNegotiator
.public abstract boolean checkConstraints()
Entry
level, e.g. because they depend on the values of
multiple parameters.true
if everything is fine, false
if that is not the caseCopyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.