Interface IClosePool
- All Known Implementing Classes:
UncloseableClosePool
public interface IClosePool
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddElements(IContainer<GroupCloseable> elements) Adds the given elements to the currentIClosePool.voidCloses the elements of the currentIClosePoolif the state of the currentIClosePoolisCloseState.OPEN.getState()
-
Method Details
-
addElements
Adds the given elements to the currentIClosePool.- Parameters:
elements-- Throws:
RuntimeException- if one of the given elements is null.RuntimeException- if the currentIClosePoolcontains already one of the given elements.
-
closeElementsIfStateIsOpen
void closeElementsIfStateIsOpen()Closes the elements of the currentIClosePoolif the state of the currentIClosePoolisCloseState.OPEN. -
getStoredElements
IContainer<GroupCloseable> getStoredElements()- Returns:
- the elements of the current
IClosePool.
-
getState
CloseState getState()- Returns:
- the state of the current
IClosePool.
-