|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.service.AbstractFederation<T>
com.bigdata.service.LocalDataServiceFederation<T>
T - The generic type of the client or service.public class LocalDataServiceFederation<T>
Integration provides a view of a local DataService as if it were a
federation. The LocalDataServiceFederation runs its own embedded
AbstractTransactionService and LoadBalancerService to support
its embedded DataService. Since there is no MetadataService,
overflow processing is disabled.
LocalDataServiceClient| Nested Class Summary | |
|---|---|
static class |
LocalDataServiceFederation.DataServiceIndexCache
Concrete implementation for a LocalDataServiceFederation. |
class |
LocalDataServiceFederation.LocalDataServiceImpl
The embedded DataService. |
| Nested classes/interfaces inherited from class com.bigdata.service.AbstractFederation |
|---|
AbstractFederation.ReportTask, AbstractFederation.StartDeferredTasksTask |
| Field Summary |
|---|
| Fields inherited from class com.bigdata.service.AbstractFederation |
|---|
log |
| Constructor Summary | |
|---|---|
LocalDataServiceFederation(LocalDataServiceClient<T> client)
|
|
| Method Summary | |
|---|---|
void |
destroy()
Destroys the embedded services and disconnects from the federation. |
void |
dropIndex(String name)
Drop a scale-out index. |
LocalDataServiceFederation.LocalDataServiceImpl |
getAnyDataService()
Returns the local IDataService. |
LocalDataServiceClient<T> |
getClient()
Extended for type-safe return. |
LocalDataServiceFederation.LocalDataServiceImpl |
getDataService()
Return the local DataService. |
IDataService |
getDataService(UUID serviceUUID)
Returns the embedded data service IFF the given serviceUUID is the UUID for the embedded data service and null
otherwise. |
IDataService |
getDataServiceByName(String name)
Return an IDataService joined with this
IBigdataFederation and having the specified service name. |
UUID |
getDataServiceUUID()
Return the UUID that identifies the local IDataService. |
UUID[] |
getDataServiceUUIDs(int maxCount)
Returns an array containing one element - the UUID of the local
IDataService. |
DataServiceIndex |
getIndex(String name,
long timestamp)
Strengthens the return type. |
protected LocalDataServiceFederation.DataServiceIndexCache |
getIndexCache()
Return the cache for IIndex objects. |
long |
getLastCommitTime()
Return the last commit time for the federation (the timestamp of the most recent commit point across all IDataServices). |
ILoadBalancerService |
getLoadBalancerService()
Return the load balancer service (or a proxy for that service). |
IMetadataIndex |
getMetadataIndex(String name,
long timestamp)
Return a read-only view of the index partitions for the named scale-out index. |
IMetadataService |
getMetadataService()
Return the metadata service (or a proxy for the metadata service). |
IResourceLockService |
getResourceLockService()
The service that may be used to acquire synchronous distributed locks without deadlock detection. |
ITransactionService |
getTransactionService()
Return the ITransactionService (or a proxy for that service). |
boolean |
isDistributed()
Return false. |
boolean |
isScaleOut()
Return false. |
boolean |
isStable()
Return true iff the federation is backed by "stable" (vs
transient) storage. |
void |
registerIndex(IndexMetadata metadata)
Registers an index that does not support scale-out. |
UUID |
registerIndex(IndexMetadata metadata,
byte[][] separatorKeys,
UUID[] dataServiceUUIDs)
Since key-range partitioned indices are not supported this method will log a warning and register the index on the local IDataService as
an unpartitioned index. |
UUID |
registerIndex(IndexMetadata metadata,
UUID dataServiceUUID)
Registers an index that does not support scale-out. |
void |
shutdown()
Extended to shutdown the embedded services. |
void |
shutdownNow()
Extended to shutdown the embedded services. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalDataServiceFederation(LocalDataServiceClient<T> client)
| Method Detail |
|---|
public LocalDataServiceClient<T> getClient()
getClient in interface IBigdataFederation<T>getClient in class AbstractFederation<T>public UUID[] getDataServiceUUIDs(int maxCount)
UUID of the local
IDataService.
maxCount - The maximum #of data services whose UUIDs will be returned.
When zero (0) the UUID for all known data services will be
returned.
UUIDs for data services.public LocalDataServiceFederation.LocalDataServiceImpl getAnyDataService()
IDataService.
null if there are NO known IDataServices.public LocalDataServiceFederation.LocalDataServiceImpl getDataService()
DataService.
public UUID getDataServiceUUID()
UUID that identifies the local IDataService.
public void registerIndex(IndexMetadata metadata)
registerIndex in interface IIndexManagerregisterIndex in interface IBigdataFederation<T>registerIndex in class AbstractFederation<T>metadata - The metadata template used to create component indices for
BTrees this scale-out index (this also specifies the
name of the scale-out index).
public UUID registerIndex(IndexMetadata metadata,
UUID dataServiceUUID)
registerIndex in interface IBigdataFederation<T>registerIndex in class AbstractFederation<T>metadata - The metadata template used to create component indices for
BTrees this scale-out index (this also specifies the
name of the scale-out index).dataServiceUUID - The data service identifier (optional). When null,
a data service will be selected automatically. If
IndexMetadata.Options#INITIAL_DATA_SERVICE was
specified, then the identified service will be used. Otherwise
an underutilized service will be selected using the
ILoadBalancerService.
IndexMetadata.Options#INITIAL_DATA_SERVICE
public UUID registerIndex(IndexMetadata metadata,
byte[][] separatorKeys,
UUID[] dataServiceUUIDs)
IDataService as
an unpartitioned index.
registerIndex in interface IBigdataFederation<T>registerIndex in class AbstractFederation<T>metadata - The metadata template used to create component indices for
BTrees this scale-out index (this also specifies the
name of the scale-out index).separatorKeys - The array of separator keys. Each separator key is interpreted
as an unsigned byte[]. The first entry MUST be an
empty byte[]. The entries MUST be in sorted order.dataServiceUUIDs - The array of data services onto which each partition defined
by a separator key will be mapped (optional). When given, the
#of entries in this array MUST agree with the #of entries in
the separatorKeys array and all entries must be non-null.
When not given, the index partitions will be auto-assigned to
the discovered data services.
protected LocalDataServiceFederation.DataServiceIndexCache getIndexCache()
AbstractFederationIIndex objects.
getIndexCache in class AbstractFederation<T>public void dropIndex(String name)
IBigdataFederation
dropIndex in interface IIndexManagerdropIndex in interface IBigdataFederation<T>dropIndex in class AbstractFederation<T>name - The index name.
public DataServiceIndex getIndex(String name,
long timestamp)
getIndex in interface IIndexStoregetIndex in interface IBigdataFederation<T>getIndex in class AbstractFederation<T>name - The index name.timestamp - A transaction identifier, ITx.UNISOLATED for the
unisolated index view, ITx.READ_COMMITTED, or
timestamp for a historical view no later than
the specified timestamp.
null if the index does not exist.public IMetadataService getMetadataService()
IBigdataFederation
null if the service has not been discovered.
UnsupportedOperationException - always since the metadata index is not used.
public IMetadataIndex getMetadataIndex(String name,
long timestamp)
IBigdataFederation
name - The name of the scale-out index.
IMetadataIndex for the named scale-out index -or-
null iff there is no such scale-out index.
UnsupportedOperationException - alwayspublic ILoadBalancerService getLoadBalancerService()
IBigdataFederation
null if the service has not been discovered.public ITransactionService getTransactionService()
IBigdataFederationITransactionService (or a proxy for that service).
null if the service has not been
discovered.public IResourceLockService getResourceLockService()
IIndexStore
public IDataService getDataService(UUID serviceUUID)
null
otherwise.
serviceUUID - The identifier for a IDataService.
IDataService or null iff the
IDataService could not be discovered from its identifier.public boolean isScaleOut()
false.
IndexMetadatapublic boolean isDistributed()
false.
public boolean isStable()
IBigdataFederationtrue iff the federation is backed by "stable" (vs
transient) storage. Most federation deployments are stable in this sense,
but it is possible to create federation instances backed solely by
transient storage and those instances will report false
here. This is most typically done for testing purposes using a
LocalDataServiceFederation or an EmbeddedFederation.
public void shutdown()
shutdown in class AbstractFederation<T>public void shutdownNow()
shutdownNow in class AbstractFederation<T>public void destroy()
destroy in interface IIndexStoredestroy in interface IBigdataFederation<T>destroy in class AbstractFederation<T>public long getLastCommitTime()
IBigdataFederationIDataServices).
This is useful for ITx.READ_COMMITTED operations that need to use
a consistent timestamp across a series of DataServices or a
series of requests against a single DataService that must use a
consistent view.
IRootBlockView.getLastCommitTime()public IDataService getDataServiceByName(String name)
IBigdataFederationIDataService joined with this
IBigdataFederation and having the specified service name.
Services that are not joined will not be discovered.
Note: At least some service fabrics (such as jini) do not enforce a
uniqueness constraint on the service name(s). In such cases an arbitrary
IDataService method the other requirements will be returned. It
is the responsibility of the administrator to ensure that each
IDataService is assigned a distinct service name.
name - The service name.
null if none is
joined with the IBigdataFederation at this time.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||