Package mil.nga.geopackage.user
Class UserRowSync<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserCoreRow<TColumn,TTable>>
- java.lang.Object
- 
- mil.nga.geopackage.user.UserRowSync<TColumn,TTable,TRow>
 
- 
- Type Parameters:
- TColumn- column type
- TTable- table type
- TRow- row type
 
 public class UserRowSync<TColumn extends UserColumn,TTable extends UserTable<TColumn>,TRow extends UserCoreRow<TColumn,TTable>> extends Object User Row Sync to support sharing a single user row read copy when multiple near simultaneous asynchronous requests are made- Since:
- 2.0.0
- Author:
- osbornb
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classUserRowSync.RowConditionCondition and row wrapper
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedUserRowSync()Constructor
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description TRowgetRowOrLock(long id)Get the row if another same id request has been made by waiting until the row has been set.voidsetRow(long id, TRow row)Set the row id, row, and notify all waiting threads to retrieve the row.
 
- 
- 
- 
Field Detail- 
lockprotected Lock lock Synchronous lock
 - 
rowsprotected Map<Long,UserRowSync.RowCondition> rows Mapping between row ids and row conditions
 
- 
 - 
Method Detail- 
getRowOrLockpublic TRow getRowOrLock(long id) Get the row if another same id request has been made by waiting until the row has been set. If no current request, lock the for the calling thread which should read the row and callsetRow(long, UserCoreRow)when complete.- Parameters:
- id- user row id
- Returns:
- row if retrieved from a previous request, null if calling thread
         should read row and set using setRow(long, UserCoreRow)
 
 - 
setRowpublic void setRow(long id, TRow row)Set the row id, row, and notify all waiting threads to retrieve the row.- Parameters:
- id- user row id
- row- user row or null
 
 
- 
 
-