public class DataService extends Object
Modifier and Type | Field and Description |
---|---|
AtomicLong |
activeTxn
Counter of active transactions
|
AtomicLong |
totalTxn
Cumulative counter of transactions
|
Constructor and Description |
---|
DataService(DatasetGraph dataset)
Create a
DataService for the given dataset. |
Modifier and Type | Method and Description |
---|---|
void |
addEndpoint(Endpoint endpoint) |
void |
addEndpoint(Operation operation) |
void |
addEndpoint(Operation operation,
AuthPolicy authPolicy) |
void |
addEndpoint(Operation operation,
String endpointName) |
void |
addEndpoint(Operation operation,
String endpointName,
AuthPolicy authPolicy) |
boolean |
allowUpdate() |
AuthPolicy |
authPolicy()
Returning null implies no authorization control
|
void |
finishTxn() |
void |
forEachEndpoint(Consumer<Endpoint> action)
Execute an action for each
Endpoint . |
CounterSet |
getCounters() |
DatasetGraph |
getDataset() |
Collection<Endpoint> |
getEndpoints()
Return a collection of all endpoints for this DataService.
|
List<Endpoint> |
getEndpoints(Operation operation) |
EndpointSet |
getEndpointSet()
Return the EndpointSet for the operations for unnamed use.
|
EndpointSet |
getEndpointSet(String endpointName)
Return the EndpointSet for the operations for named use.
|
Collection<Operation> |
getOperations()
Return the operations available here.
|
long |
getRequests() |
long |
getRequestsBad() |
long |
getRequestsGood() |
void |
goActive() |
void |
goOffline() |
boolean |
hasOperation(Operation operation)
Return the operations available here.
|
boolean |
isAcceptingRequests() |
void |
setAuthPolicy(AuthPolicy authPolicy) |
void |
setEndpointProcessors(OperationRegistry operationRegistry)
Set any
ActionService processors is currently unset. |
void |
shutdown()
Shutdown and never use again.
|
void |
startTxn(TxnType mode) |
public AtomicLong activeTxn
public AtomicLong totalTxn
public DataService(DatasetGraph dataset)
DataService
for the given dataset.public DatasetGraph getDataset()
public void addEndpoint(Operation operation)
public void addEndpoint(Operation operation, AuthPolicy authPolicy)
public void addEndpoint(Operation operation, String endpointName, AuthPolicy authPolicy)
public void addEndpoint(Endpoint endpoint)
public EndpointSet getEndpointSet(String endpointName)
public EndpointSet getEndpointSet()
public Collection<Endpoint> getEndpoints()
public void forEachEndpoint(Consumer<Endpoint> action)
Endpoint
.public Collection<Operation> getOperations()
to get the endpoint list
public boolean hasOperation(Operation operation)
to get the endpoint list
public boolean allowUpdate()
public void goOffline()
public void setEndpointProcessors(OperationRegistry operationRegistry)
ActionService
processors is currently unset.public void goActive()
public boolean isAcceptingRequests()
public CounterSet getCounters()
public long getRequests()
public long getRequestsGood()
public long getRequestsBad()
public void startTxn(TxnType mode)
public void finishTxn()
public void shutdown()
public void setAuthPolicy(AuthPolicy authPolicy)
public AuthPolicy authPolicy()
Licensed under the Apache License, Version 2.0