Skip to content
Commit 3143ee3f authored by Oli Lan's avatar Oli Lan
Browse files

Add methods to Rollback to retrieve and check package names.

This adds methods to the Rollback class that allow lists of package names
to be retrieved. Methods to check is a certain package is present are
also added.

This allows several cases where code in RollbackManagerServiceImpl iterated
over the list of packages in a Rollback to be replaced by Rollback method calls.

Once all such cases have been replaced, access to the list of PackageRollbackInfo
in a Rollback will be internal to Rollback, which will allow synchronisation to be
implemented within the Rollback class. It will also give a cleaner Rollback API where
the internal state of rollbacks is not exposed to other classes.

For now, synchronisation is still performed within RollbackManagerServiceImpl for
consistency. This will be changed once future CLs to move other Rollback
functionality (e.g. lifecycle functions such as commit, delete) has also been moved.

Bug: 136241838
Test: unit tests added to RollbackUnitTest
Test: atest RollbackTest

Change-Id: If00f36da4c0b51e9a579ab09e3d44f1a6370a912
parent 8c0084d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment