public final class PsTableGroup
extends java.lang.Object
PsConfig object with the appropriate
configuration parameters.init(PsConfig).PsConfig.numLocalWorkerThreads threads, each must first
call registerWorkerThread(), do some application defined work,
and end with calling deregisterWorkerThread().shutdown().| Constructor and Description |
|---|
PsTableGroup() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clock()
Advance the clock for the calling application thread.
|
static void |
createDenseDoubleTable(int tableId,
int staleness,
int rowCapacity)
Creates a dense double table, which can later be retrieved using
getDoubleTable. |
static void |
createDenseFloatTable(int tableId,
int staleness,
int rowCapacity)
Creates a dense float table, which can later be retrieved using
getFloatTable. |
static void |
createDenseIntTable(int tableId,
int staleness,
int rowCapacity)
Creates a dense int table, which can later be retrieved using
getIntTable. |
static void |
createDenseLongTable(int tableId,
int staleness,
int rowCapacity)
Creates a dense long table, which can later be retrieved using
getLongTable. |
static void |
createSparseDoubleTable(int tableId,
int staleness)
Creates a sparse double table, which can later be retrieved using
getDoubleTable. |
static void |
createSparseFloatTable(int tableId,
int staleness)
Creates a sparse float table, which can later be retrieved using
getFloatTable. |
static void |
createSparseIntTable(int tableId,
int staleness)
Creates a sparse int table, which can later be retrieved using
getIntTable. |
static void |
createSparseLongTable(int tableId,
int staleness)
Creates a sparse long table, which can later be retrieved using
getLongTable. |
static void |
createTable(int tableId,
int staleness,
RowFactory rowFactory,
RowUpdateFactory rowUpdateFactory)
Creates a Bosen PS table.
|
static void |
deregisterWorkerThread()
De-registers an application worker thread.
|
static int |
getClientId()
Returns the ID of this client.
|
static DoubleTable |
getDoubleTable(int tableId)
Retrieves a table that was created using
createDenseDoubleTable or
createSparseDoubleTable. |
static FloatTable |
getFloatTable(int tableId)
Retrieves a table that was created using
createDenseFloatTable or
createSparseFloatTable. |
static IntTable |
getIntTable(int tableId)
Retrieves a table that was created using
createDenseIntTable or
createSparseIntTable. |
static LongTable |
getLongTable(int tableId)
Retrieves a table that was created using
createDenseLongTable or
createSparseLongTable. |
static int |
getNumClients()
Returns the total number of Bosen PS clients.
|
static int |
getNumLocalWorkerThreads()
Returns the number of worker threads that run on each client.
|
static int |
getNumTotalWorkerThreads()
Returns the total number of worker threads across all clients.
|
static Table |
getTable(int tableId)
Retrieves a table that was created before worker threads are registered.
|
static void |
globalBarrier()
Threads that calls this method must be at the same clock.
|
static void |
init(PsConfig config)
Initialize the global Bosen PS environment.
|
static int |
registerWorkerThread()
Register an application worker thread.
|
static void |
shutdown()
Shuts down the global Bosen PS environment.
|
public static void init(PsConfig config)
config - configuration options for the Bosen PS.public static void shutdown()
public static int getClientId()
init(PsConfig) has been called.public static int getNumClients()
init(PsConfig) has been called.public static int getNumLocalWorkerThreads()
init(PsConfig) has been called.public static int getNumTotalWorkerThreads()
init(PsConfig) has been called.public static void createTable(int tableId,
int staleness,
RowFactory rowFactory,
RowUpdateFactory rowUpdateFactory)
tableId - int ID of this table.staleness - SSP staleness parameter.rowFactory - object used to produce rows.rowUpdateFactory - object used to produce row updates.public static Table getTable(int tableId)
tableId - ID of the table to retrieve.public static void createDenseDoubleTable(int tableId,
int staleness,
int rowCapacity)
getDoubleTable. This method must be called
by each client in order to create the table. This method can only be
called after PsTableGroup is initialized and before any worker thread is
registered.tableId - int ID of this table.staleness - SSP staleness parameter.rowCapacity - capacity of the stored rows.public static void createSparseDoubleTable(int tableId,
int staleness)
getDoubleTable. This method must be called
by each client in order to create the table. This method can only be
called after PsTableGroup is initialized and before any worker thread is
registered.tableId - int ID of this table.staleness - SSP staleness parameter.public static DoubleTable getDoubleTable(int tableId)
createDenseDoubleTable or
createSparseDoubleTable. This
method can only be called from inside of registered worker threads.tableId - ID of the table to retrieve.public static void createDenseFloatTable(int tableId,
int staleness,
int rowCapacity)
getFloatTable. This method must be called
by each client in order to create the table. This method can only be
called after PsTableGroup is initialized and before any worker thread is
registered.tableId - int ID of this table.staleness - SSP staleness parameter.rowCapacity - capacity of the stored rows.public static void createSparseFloatTable(int tableId,
int staleness)
getFloatTable. This method must be called
by each client in order to create the table. This method can only be
called after PsTableGroup is initialized and before any worker thread is
registered.tableId - int ID of this table.staleness - SSP staleness parameter.public static FloatTable getFloatTable(int tableId)
createDenseFloatTable or
createSparseFloatTable. This
method can only be called from inside of registered worker threads.tableId - ID of the table to retrieve.public static void createDenseIntTable(int tableId,
int staleness,
int rowCapacity)
getIntTable. This method must be called
by each client in order to create the table. This method can only be
called after PsTableGroup is initialized and before any worker thread is
registered.tableId - int ID of this table.staleness - SSP staleness parameter.rowCapacity - capacity of the stored rows.public static void createSparseIntTable(int tableId,
int staleness)
getIntTable. This method must be called
by each client in order to create the table. This method can only be
called after PsTableGroup is initialized and before any worker thread is
registered.tableId - int ID of this table.staleness - SSP staleness parameter.public static IntTable getIntTable(int tableId)
createDenseIntTable or
createSparseIntTable. This
method can only be called from inside of registered worker threads.tableId - ID of the table to retrieve.public static void createDenseLongTable(int tableId,
int staleness,
int rowCapacity)
getLongTable. This method must be called
by each client in order to create the table. This method can only be
called after PsTableGroup is initialized and before any worker thread is
registered.tableId - int ID of this table.staleness - SSP staleness parameter.rowCapacity - capacity of the stored rows.public static void createSparseLongTable(int tableId,
int staleness)
getLongTable. This method must be called
by each client in order to create the table. This method can only be
called after PsTableGroup is initialized and before any worker thread is
registered.tableId - int ID of this table.staleness - SSP staleness parameter.public static LongTable getLongTable(int tableId)
createDenseLongTable or
createSparseLongTable. This
method can only be called from inside of registered worker threads.tableId - ID of the table to retrieve.public static int registerWorkerThread()
public static void deregisterWorkerThread()
public static void clock()
public static void globalBarrier()