Class SemaphoreKeeperGuavaImpl<K>
java.lang.Object
org.opendaylight.openflowplugin.applications.frsync.util.SemaphoreKeeperGuavaImpl<K>
- All Implemented Interfaces:
- SemaphoreKeeper<K>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidreleaseGuard(@Nullable Semaphore guard) Unlock and release guard.summonGuard(@NonNull K key) Create or load semaphore for key from cache.summonGuardAndAcquire(@NonNull K key) Get guard and lock for key.
- 
Constructor Details- 
SemaphoreKeeperGuavaImplpublic SemaphoreKeeperGuavaImpl(int permits, boolean fair) 
 
- 
- 
Method Details- 
summonGuardDescription copied from interface:SemaphoreKeeperCreate or load semaphore for key from cache.- Specified by:
- summonGuardin interface- SemaphoreKeeper<K>
- Parameters:
- key- semaphore identifier
- Returns:
- new or existing semaphore for given key, for one key there is always only one semaphore available
 
- 
summonGuardAndAcquireDescription copied from interface:SemaphoreKeeperGet guard and lock for key.- Specified by:
- summonGuardAndAcquirein interface- SemaphoreKeeper<K>
- Parameters:
- key- for which guard should be created and acquired
- Returns:
- semaphore guard
 
- 
releaseGuardDescription copied from interface:SemaphoreKeeperUnlock and release guard.- Specified by:
- releaseGuardin interface- SemaphoreKeeper<K>
- Parameters:
- guard- semaphore guard which should be released
 
 
-