|
||||||||||
| 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.AbstractScaleOutFederation<T>
com.bigdata.service.EmbeddedFederation<T>
public class EmbeddedFederation<T>
An implementation that uses an embedded database rather than a distributed
database. An embedded federation runs entirely in process, but uses the same
DataService and MetadataService implementations as a
distributed federation. All services reference the EmbeddedFederation
and use the same thread pool for most operations. However, the
EmbeddedFederation.EmbeddedDataServiceImpl has its own WriteExecutorService.
Unlike a distributed federation, an embedded federation starts and stops with
the client. An embedded federation may be used to assess or remove the
overhead of network operations, to simplify testing of client code, or to
deploy a scale-up (vs scale-out) solution.
| Nested Class Summary | |
|---|---|
protected class |
EmbeddedFederation.EmbeddedDataServiceImpl
Concrete implementation. |
protected class |
EmbeddedFederation.EmbeddedLoadBalancerServiceImpl
|
protected class |
EmbeddedFederation.EmbeddedTransactionServiceImpl
|
| Nested classes/interfaces inherited from class com.bigdata.service.AbstractScaleOutFederation |
|---|
AbstractScaleOutFederation.ForceOverflowTask, AbstractScaleOutFederation.PurgeResourcesTask |
| Nested classes/interfaces inherited from class com.bigdata.service.AbstractFederation |
|---|
AbstractFederation.ReportTask, AbstractFederation.StartDeferredTasksTask |
| Field Summary |
|---|
| Fields inherited from class com.bigdata.service.AbstractScaleOutFederation |
|---|
metadataIndexCachePolicy |
| Fields inherited from class com.bigdata.service.AbstractFederation |
|---|
log |
| Constructor Summary | |
|---|---|
protected |
EmbeddedFederation(EmbeddedClient<T> client)
Start or restart an embedded bigdata federation. |
| Method Summary | |
|---|---|
void |
destroy()
Destroys all discovered services belonging to the federation and their persistent data and disconnects from the federation. |
IDataService |
getAnyDataService()
Return ANY IDataService which has been (or could be) discovered
and which is part of the connected federation. |
EmbeddedClient<T> |
getClient()
Return the client object that was used to connect to the federation. |
File |
getDataDir()
The directory in which the data files will reside. |
DataService |
getDataService(int index)
There are getDataServiceCount() data services defined in the
federation. |
IDataService |
getDataService(UUID serviceUUID)
Return the (in process) data service given its service UUID. |
IDataService |
getDataServiceByName(String name)
Return an IDataService joined with this
IBigdataFederation and having the specified service name. |
int |
getDataServiceCount()
The #of configured data services in the embedded federation. |
UUID[] |
getDataServiceUUIDs(int maxCount)
Return an array UUIDs for IDataServices. |
long |
getLastCommitTime()
This scans the DataServices and reports the most recent value. |
ILoadBalancerService |
getLoadBalancerService()
The (in process) LoadBalancerService. |
IMetadataService |
getMetadataService()
The (in process) MetadataService. |
IResourceLockService |
getResourceLockService()
The (in process) IResourceLockService. |
ITransactionService |
getTransactionService()
The (in process) ITransactionService. |
boolean |
isDistributed()
Return false. |
boolean |
isStable()
Return true iff the federation is backed by "stable" (vs
transient) storage. |
boolean |
isTransient()
Return true if the federation is not backed by disk. |
void |
shutdown()
Normal shutdown of the services in the federation. |
void |
shutdownNow()
Immediate shutdown of the services in the embedded federation. |
| Methods inherited from class com.bigdata.service.AbstractScaleOutFederation |
|---|
awaitServices, forceOverflow, getIndex, getIndexCache, getMetadataIndex, getMetadataIndexCache, isScaleOut, locatorScan |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected EmbeddedFederation(EmbeddedClient<T> client)
client - The client.| Method Detail |
|---|
public final File getDataDir()
UUID - restart depends on this.
public boolean isTransient()
public EmbeddedClient<T> getClient()
IBigdataFederation
getClient in interface IBigdataFederation<T>getClient in class AbstractFederation<T>public final ITransactionService getTransactionService()
ITransactionService.
null if the service has not been
discovered.public final IResourceLockService getResourceLockService()
IResourceLockService.
public final ILoadBalancerService getLoadBalancerService()
LoadBalancerService.
null if the service has not been discovered.public final IMetadataService getMetadataService()
MetadataService.
null if the service has not been discovered.public final IDataService getDataService(UUID serviceUUID)
serviceUUID -
DataService for that UUID or null if
there is no data service instance with that service UUID.public final int getDataServiceCount()
public final DataService getDataService(int index)
getDataServiceCount() data services defined in the
federation. This returns the data service with that index.
index - The index.
public final UUID[] getDataServiceUUIDs(int maxCount)
IBigdataFederationIDataServices.
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 final IDataService getAnyDataService()
IBigdataFederationIDataService which has been (or could be) discovered
and which is part of the connected federation.
Note: This method is here as a failsafe when the
ILoadBalancerService is not available.
null if there are NO known IDataServices.public void shutdown()
shutdown in class AbstractScaleOutFederation<T>public void shutdownNow()
shutdownNow in class AbstractScaleOutFederation<T>public void destroy()
IBigdataFederation
destroy in interface IIndexStoredestroy in interface IBigdataFederation<T>destroy in class AbstractFederation<T>public final boolean isDistributed()
false.
public final 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 long getLastCommitTime()
DataServices and reports the most recent value.
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 | |||||||||