T
- The generic type of the client or service.public interface IBigdataFederation<T> extends IIndexManager, IFederationDelegate<T>, ICounterSetAccess
IBigdataFederation
which it uses to communicate with
the other services in the federation.Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys all discovered services belonging to the federation and their
persistent data and disconnects from the federation.
|
void |
dropIndex(String name)
Drop a scale-out index.
|
IDataService |
getAnyDataService()
Return ANY
IDataService which has been (or could be) discovered
and which is part of the connected federation. |
IBigdataClient<T> |
getClient()
Return the client object that was used to connect to the federation.
|
CounterSet |
getCounters()
The
CounterSet which the client will use report its statistics to
the ILoadBalancerService . |
IDataService |
getDataService(UUID serviceUUID)
Resolve the service identifier to an
IDataService . |
IDataService |
getDataServiceByName(String name)
Return an
IDataService joined with this
IBigdataFederation and having the specified service name. |
IDataService[] |
getDataServices(UUID[] uuid)
Return an array of
IDataService references that is correlated
with the given array of IDataService UUID s. |
UUID[] |
getDataServiceUUIDs(int maxCount)
Return an array UUIDs for
IDataService s. |
ExecutorService |
getExecutorService()
A thread pool that may be used by clients to parallelize operations
against the federation.
|
CounterSet |
getHostCounterSet()
The node in
getCounters() corresponding to the root of the
host on which the client or service is executing. |
String |
getHttpdURL()
The URL that may be used to access the local httpd service for this
client or service.
|
IClientIndex |
getIndex(String name,
long timestamp)
Obtain a view on a partitioned index.
|
long |
getLastCommitTime()
Return the last commit time for the federation (the timestamp of the most
recent commit point across all
IDataService s). |
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).
|
String |
getServiceCounterPathPrefix()
The path prefix under which all of the client or service's counters are
located.
|
CounterSet |
getServiceCounterSet()
The node in
getCounters() corresponding to the root of the
client or service connected using this federation. |
ITransactionService |
getTransactionService()
Return the
ITransactionService (or a proxy for that service). |
boolean |
isDistributed()
Return
true iff the federation is distributed (uses RMI and
is running, at least in principle, across more than one host/JVM). |
boolean |
isJiniFederation()
Convenience method to return whether the Federation is a Jini Federation.
|
boolean |
isScaleOut()
Return
true iff the federation supports scale-out indices
(supports key-range partitioned indices). |
boolean |
isStable()
Return
true iff the federation is backed by "stable" (vs
transient) storage. |
void |
registerIndex(IndexMetadata metadata)
Register a scale-out index.
|
UUID |
registerIndex(IndexMetadata metadata,
byte[][] separatorKeys,
UUID[] dataServiceUUIDs)
Register and statically partition a scale-out index.
|
UUID |
registerIndex(IndexMetadata metadata,
UUID dataServiceUUID)
Register a scale-out index and assign the initial index partition to the
specified data service.
|
isGroupCommit
addScheduledTask, getCollectPlatformStatistics, getCollectQueueStatistics, getGlobalFileSystem, getGlobalRowStore, getGlobalRowStore, getHttpdPort, getResourceLocator, getResourceLockService, getTempStore
indexNameScan
didStart, getService, getServiceIface, getServiceName, getServiceUUID, isServiceReady, newHttpd, reattachDynamicCounters, serviceJoin, serviceLeave
IBigdataClient<T> getClient()
IllegalStateException
- if the client disconnected and this object is no longer
valid.String getHttpdURL()
null
if the httpd service is not
running.ITransactionService getTransactionService()
ITransactionService
(or a proxy for that service).null
if the service has not been
discovered.ILoadBalancerService getLoadBalancerService()
null
if the service has not been discovered.IMetadataService getMetadataService()
null
if the service has not been discovered.ExecutorService getExecutorService()
ClientIndexView
.getExecutorService
in interface IIndexStore
CounterSet getCounters()
CounterSet
which the client will use report its statistics to
the ILoadBalancerService
.
Note: Applications MAY add their own counters (within a suitable
namespace) to the returned CounterSet
in order to report their
own performance data to the ILoadBalancerService
.
getCounters
in interface ICounterSetAccess
getServiceCounterSet()
,
getServiceCounterPathPrefix()
CounterSet getHostCounterSet()
getCounters()
corresponding to the root of the
host on which the client or service is executing.CounterSet getServiceCounterSet()
getCounters()
corresponding to the root of the
client or service connected using this federation.String getServiceCounterPathPrefix()
ICounterSet.pathSeparator
.getServiceCounterSet()
UUID[] getDataServiceUUIDs(int maxCount)
IDataService
s.maxCount
- The maximum #of data services whose UUIDs will be returned.
When zero (0) the UUID for all known data services will be
returned.UUID
s for data services.IDataService[] getDataServices(UUID[] uuid)
IDataService
references that is correlated
with the given array of IDataService
UUID
s.
Note: This method will also resolve the UUID
of an
IMetadataService
.
uuids
- The (meta)data service UUIDs.IDataService getDataService(UUID serviceUUID)
IDataService
.
Note: Whether the returned object is a proxy or the service implementation depends on whether the federation is embedded (in process) or distributed (networked).
serviceUUID
- The identifier for a IDataService
.IDataService
or null
iff the
IDataService
could not be discovered from its identifier.IDataService getAnyDataService()
IDataService
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 IDataService
s.IDataService getDataServiceByName(String name)
IDataService
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.IllegalArgumentException
- if name is null
.IMetadataIndex getMetadataIndex(String name, long timestamp)
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.void registerIndex(IndexMetadata metadata)
registerIndex
in interface IGISTManager
metadata
- The metadata template used to create component indices for
BTree
s this scale-out index (this also specifies the
name of the scale-out index).IGISTLocalManager.getIndexLocal(String, long)
UUID registerIndex(IndexMetadata metadata, UUID dataServiceUUID)
metadata
- The metadata template used to create component indices for
BTree
s 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
UUID registerIndex(IndexMetadata metadata, byte[][] separatorKeys, UUID[] dataServiceUUIDs)
metadata
- The metadata template used to create component indices for
BTree
s 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.void dropIndex(String name)
dropIndex
in interface IGISTManager
name
- The index name.IClientIndex getIndex(String name, long timestamp)
getIndex
in interface IIndexManager
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.IGISTLocalManager.getIndexLocal(String, long)
boolean isScaleOut()
true
iff the federation supports scale-out indices
(supports key-range partitioned indices). Note that a true
return does NOT imply that the federation is running in a distributed
environment, just that it uses the scale-out index architecture. A
false
return indicates that getMetadataService()
WILL NOT return a IMetadataService
since key-range partitioned
indices are NOT supported.IndexMetadata
boolean isDistributed()
true
iff the federation is distributed (uses RMI and
is running, at least in principle, across more than one host/JVM).boolean isStable()
true
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
.void destroy()
destroy
in interface IIndexStore
long getLastCommitTime()
IDataService
s).
This is useful for ITx.READ_COMMITTED
operations that need to use
a consistent timestamp across a series of DataService
s or a
series of requests against a single DataService
that must use a
consistent view.
getLastCommitTime
in interface IIndexStore
IRootBlockView.getLastCommitTime()
boolean isJiniFederation()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.