@NotThreadSafe public abstract class Concourse extends Object implements AutoCloseable
connect() methods to instantiate.
Concourse is a self-tuning database that enables live analytics for large streams of operational data. Developers use Concourse to quickly build software that requires both ACID transactions and the ability to get data insights on demand. With Concourse, end-to-end data management requires no extra infrastructure, no prior configuration and no additional coding–all of which greatly reduce costs and allow developers to focus on core business problems.
By default, Concourse conducts every operation in autocommit mode
where every change is immediately written. Concourse also supports the
ability to stage a group of operations within transactions that are atomic,
consistent, isolated, and durable using the stage(),
commit() and abort() methods.
You should not use the same client connection in multiple
threads. If you need to interact with Concourse using multiple threads, you
should create a separate connection for each thread or use a
ConnectionPool.
| Constructor and Description |
|---|
Concourse() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
abort()
Abort the current transaction and discard any changes that are currently
staged.
|
abstract <T> long |
add(String key,
T value)
Append
key as value in a new record. |
abstract <T> Map<Long,Boolean> |
add(String key,
T value,
Collection<Long> records)
Atomically append
key as value in each of the
records where it doesn't exist. |
abstract <T> boolean |
add(String key,
T value,
long record)
Append
key as value in record if and only if it
doesn't exist. |
abstract Map<Timestamp,String> |
audit(long record)
Return a list all the changes ever made to
record. |
abstract Map<Timestamp,String> |
audit(long record,
Timestamp start)
Return a list all the changes made to
record since start
(inclusive). |
abstract Map<Timestamp,String> |
audit(long record,
Timestamp start,
Timestamp end)
Return a list all the changes made to
record between
start (inclusive) and end (non-inclusive). |
abstract Map<Timestamp,String> |
audit(String key,
long record)
Return a list all the changes ever made to the
key field in
record |
abstract Map<Timestamp,String> |
audit(String key,
long record,
Timestamp start)
Return a list of all the changes made to the
key field in
record since start (inclusive). |
abstract Map<Timestamp,String> |
audit(String key,
long record,
Timestamp start,
Timestamp end)
Return a list of all the changes made to the
key field in
record between start (inclusive) and end
(non-inclusive). |
abstract Map<String,Map<Object,Set<Long>>> |
browse(Collection<String> keys)
Return a view of the values from all records that are currently stored
for each of the
keys. |
abstract Map<String,Map<Object,Set<Long>>> |
browse(Collection<String> keys,
Timestamp timestamp)
Return a view of the values from all records that were stored for each of
the
keys at timestamp. |
abstract Map<Object,Set<Long>> |
browse(String key)
Return a view of the values from all records that are currently stored
for
key. |
abstract Map<Object,Set<Long>> |
browse(String key,
Timestamp timestamp)
Return a view of the values from all records that were stored for
key at timestamp. |
Calculator |
calculate()
Return a
Calculator to use for calculations across data. |
Object |
calculate(String method,
Object... args)
Perform the specified calculation
method using the provided
args. |
abstract Map<Timestamp,Set<Object>> |
chronologize(String key,
long record)
Return a time series that contains a snapshot of the values stored for
key in record after every change made to the field. |
abstract Map<Timestamp,Set<Object>> |
chronologize(String key,
long record,
Timestamp start)
Return a time series between
start (inclusive) and the present
that contains a snapshot of the values stored for key in
record after every change made to the field during the time span. |
abstract Map<Timestamp,Set<Object>> |
chronologize(String key,
long record,
Timestamp start,
Timestamp end)
Return a time series between
start (inclusive) and end
(non-inclusive) that contains a snapshot of the values stored for
key in record after every change made to the field during
the time span. |
abstract void |
clear(Collection<Long> records)
Atomically remove all the values stored for every key in each of the
records. |
abstract void |
clear(Collection<String> keys,
Collection<Long> records)
Atomically remove all the values stored for each of the
keys in
each of the records. |
abstract void |
clear(Collection<String> keys,
long record)
Atomically remove all the values stored for each of the
keys in
record. |
abstract void |
clear(long record)
Atomically remove all the values stored for every key in
record. |
abstract void |
clear(String key,
Collection<Long> records)
Atomically remove all the values stored for
key in each of the
records. |
abstract void |
clear(String key,
long record)
Atomically remove all the values stored for
key in record |
void |
close()
An alias for the
exit() method. |
abstract boolean |
commit()
Attempt to permanently commit any changes that are staged in a
transaction and return
true if and only if all the changes can be
applied. |
static Concourse |
connect()
Create a new connection to the Concourse deployment described in
./concourse_client.prefs (or, if the file does not exist, the
default environment of the server at localhost:1717) and return a handle
to facilitate interaction. |
static Concourse |
connect(String environment)
Create a new connection to the specified
environment of the
Concourse deployment described in ~/concourse_client.prefs (or,
if the file does not exist, the server at localhost:1717) and return a
handle to facilitate interaction. |
static Concourse |
connect(String host,
int port,
String username,
String password)
Create a new connection to the default environment of the specified
Concourse Server and return a handle to facilitate interaction.
|
static Concourse |
connect(String host,
int port,
String username,
String password,
String environment)
Create a new connection to the specified
environment of the
specified Concourse Server and return a handle to facilitate interaction. |
static Concourse |
connectWithPrefs(String file)
Create a new connection using the information specified in the prefs
file. |
protected abstract Concourse |
copyConnection()
Return a new
Concourse connection that is connected to the same
deployment with the same credentials as this connection. |
static Concourse |
copyExistingConnection(Concourse concourse)
Create a new connecting by copying the connection information from the
provided
concourse handle. |
abstract Set<String> |
describe()
Return all of the keys in the database.
|
abstract Map<Long,Set<String>> |
describe(Collection<Long> records)
For each of the
records, return all of the keys that have at
least one value. |
abstract Map<Long,Set<String>> |
describe(Collection<Long> records,
Timestamp timestamp)
For each of the
records, return all the keys that had at least
one value at timestamp. |
abstract Set<String> |
describe(long record)
Return all the keys in
record that have at least one value. |
abstract Set<String> |
describe(long record,
Timestamp timestamp)
Return all the keys in
record that had at least one value at
timestamp. |
abstract Set<String> |
describe(Timestamp timestamp)
Return all of the keys in the database at
timestamp. |
abstract <T> Map<String,Map<Diff,Set<T>>> |
diff(long record,
Timestamp start)
Return the net changes made to
record since
start. |
abstract <T> Map<String,Map<Diff,Set<T>>> |
diff(long record,
Timestamp start,
Timestamp end)
Return the net changes made to
record from start
to end. |
abstract <T> Map<Diff,Set<T>> |
diff(String key,
long record,
Timestamp start)
List the net changes made to
key in record since
start. |
abstract <T> Map<Diff,Set<T>> |
diff(String key,
long record,
Timestamp start,
Timestamp end)
Return the net changes made to
key in record
from start to end. |
abstract <T> Map<T,Map<Diff,Set<Long>>> |
diff(String key,
Timestamp start)
Return the net changes made to the
key field across all
records since start. |
abstract <T> Map<T,Map<Diff,Set<Long>>> |
diff(String key,
Timestamp start,
Timestamp end)
Return the net changes made to the
key field across all
records from start to end. |
abstract void |
exit()
Terminate the client's session and close this connection.
|
abstract Set<Long> |
find(Criteria criteria)
Return the set of records that satisfy the
criteria. |
abstract Set<Long> |
find(Object criteria)
Return the set of records that satisfy the
criteria. |
abstract Set<Long> |
find(String ccl)
Return the set of records that satisfy the
ccl filter. |
abstract Set<Long> |
find(String key,
Object value)
Return the set of records where
key equals value. |
abstract Set<Long> |
find(String key,
Object value,
Timestamp timestamp)
Return the set of records where
key was equal to value at timestamp. |
abstract Set<Long> |
find(String key,
Operator operator,
Object value)
Return the set of
records where the key field contains at
least one value that satisfies the operator in relation to the
value. |
abstract Set<Long> |
find(String key,
Operator operator,
Object value,
Object value2)
Return the set of
records where the key field contains at
least one value that satisfies the operator in relation to
value and value2. |
abstract Set<Long> |
find(String key,
Operator operator,
Object value,
Object value2,
Timestamp timestamp)
Return the set of
records where the key field contained
at least one value at timestamp that satisfies the
operator in relation to value and value2. |
abstract Set<Long> |
find(String key,
Operator operator,
Object value,
Timestamp timestamp)
Return the set of
records where the key field contained
at least one value at that satisfies the operator in
relation to the value. |
abstract Set<Long> |
find(String key,
String operator,
Object value)
Return the set of
records where the key field contains at
least one value that satisfies the operator in relation to the
value. |
abstract Set<Long> |
find(String key,
String operator,
Object value,
Object value2)
Return the set of
records where the key field contains at
least one value that satisfies the operator in relation to
value and value2. |
abstract Set<Long> |
find(String key,
String operator,
Object value,
Object value2,
Timestamp timestamp)
Return the set of
records where the key field contained
at least one value at timestamp that satisfies the
operator in relation to value and value2. |
abstract Set<Long> |
find(String key,
String operator,
Object value,
Timestamp timestamp)
Return the set of
records where the key field contained
at least one value at timestamp that satisfies the
operator in relation to the value. |
abstract <T> long |
findOrAdd(String key,
T value)
Return the unique record where
key equals
value, or throw a DuplicateEntryException if multiple
records match the condition. |
long |
findOrInsert(BuildableState criteria,
Map<String,Object> data)
Return the unique record that matches the
criteria, if
one exist or throw a DuplicateEntryException if multiple records
match. |
long |
findOrInsert(BuildableState criteria,
Multimap<String,Object> data)
Return the unique record that matches the
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. |
long |
findOrInsert(BuildableState criteria,
String json)
Return the unique record that matches the
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. |
long |
findOrInsert(Criteria criteria,
Map<String,Object> data)
Return the unique record that matches the
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. |
long |
findOrInsert(Criteria criteria,
Multimap<String,Object> data)
Return the unique record that matches the
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. |
abstract long |
findOrInsert(Criteria criteria,
String json)
Return the unique record that matches the
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. |
long |
findOrInsert(String ccl,
Map<String,Object> data)
Return the unique record that matches the
ccl filter, if one
exist or throw a DuplicateEntryException if multiple records
match. |
long |
findOrInsert(String ccl,
Multimap<String,Object> data)
Return the unique record that matches the
ccl filter, if one
exist or throw a DuplicateEntryException if multiple records
match. |
abstract long |
findOrInsert(String ccl,
String json)
Return the unique record that matches the
ccl filter, if one
exist or throw a DuplicateEntryException if multiple records
match. |
abstract <T> Map<Long,Map<String,T>> |
get(Collection<String> keys,
Collection<Long> records)
For each of the
keys in each of the records, return the
stored value that was most recently added. |
abstract <T> Map<Long,Map<String,T>> |
get(Collection<String> keys,
Collection<Long> records,
Timestamp timestamp)
For each of the
keys in each of the records, return the
stored value that was most recently added at timestamp. |
abstract <T> Map<Long,Map<String,T>> |
get(Collection<String> keys,
Criteria criteria)
For each of the
keys in every record that matches the
criteria, return the stored value that was most recently
added. |
abstract <T> Map<Long,Map<String,T>> |
get(Collection<String> keys,
Criteria criteria,
Timestamp timestamp)
For each of the
keys in every record that matches the
criteria, return the stored value that was most recently
added at timestamp. |
abstract <T> Map<String,T> |
get(Collection<String> keys,
long record)
For each of the
keys in record, return the stored value
that was most recently added. |
abstract <T> Map<String,T> |
get(Collection<String> keys,
long record,
Timestamp timestamp)
For each of the
keys in record, return the stored value
that was most recently added at timestamp. |
abstract <T> Map<Long,Map<String,T>> |
get(Collection<String> keys,
Object criteria)
For each of the
keys in every record that matches the
criteria, return the stored value that was most recently
added. |
abstract <T> Map<Long,Map<String,T>> |
get(Collection<String> keys,
Object criteria,
Timestamp timestamp)
For each of the
keys in every record that matches the
criteria, return the stored value that was most recently
added at timestamp. |
abstract <T> Map<Long,Map<String,T>> |
get(Collection<String> keys,
String ccl)
For each of the
keys in every record that matches the ccl
filter, return the stored value that was most recently added. |
abstract <T> Map<Long,Map<String,T>> |
get(Collection<String> keys,
String ccl,
Timestamp timestamp)
For each of the
keys in every record that matches the ccl
filter, return the stored value that was most recently added at
timestamp. |
abstract <T> Map<Long,Map<String,T>> |
get(Criteria criteria)
For every key in every record that matches the
criteria, return
the stored value that was most recently added. |
abstract <T> Map<Long,Map<String,T>> |
get(Criteria criteria,
Timestamp timestamp)
For every key in every record that matches the
criteria, return
the stored value that was most recently added at timestamp . |
abstract <T> Map<Long,Map<String,T>> |
get(Object criteria)
For every key in every record that matches the
criteria, return
the stored value that was most recently added. |
abstract <T> Map<Long,Map<String,T>> |
get(Object criteria,
Timestamp timestamp)
For every key in every record that matches the
criteria, return
the stored value that was most recently added at timestamp. |
abstract <T> Map<Long,Map<String,T>> |
get(String ccl)
For every key in every record that matches the
ccl filter, return
the stored value that was most recently added. |
abstract <T> Map<Long,T> |
get(String key,
Collection<Long> records)
For each of the
records, return the stored value in the
key field that was most recently added. |
abstract <T> Map<Long,T> |
get(String key,
Collection<Long> records,
Timestamp timestamp)
For each of the
records, return the stored value in the
key field that was most recently added at timestamp |
abstract <T> Map<Long,T> |
get(String key,
Criteria criteria)
For every record that matches the
criteria, return the stored
value in the key field that was most recently added. |
abstract <T> Map<Long,T> |
get(String key,
Criteria criteria,
Timestamp timestamp)
For every record that matches the
criteria, return the
stored value in the key field that was most recently added at
timestamp. |
abstract <T> T |
get(String key,
long record)
Return the stored value that was most recently added for
key in
record. |
<T> T |
get(String key,
Long record)
Return the stored value that was most recently added for
key in
record. |
abstract <T> T |
get(String key,
long record,
Timestamp timestamp)
Return the stored value that was most recently added for
key in
record at timestamp. |
<T> T |
get(String key,
Long record,
Timestamp timestamp)
Return the stored value that was most recently added for
key in
record at timestamp. |
abstract <T> Map<Long,T> |
get(String key,
Object criteria)
For every record that matches the
criteria, return the stored
value in the key field that was most recently added. |
abstract <T> Map<Long,T> |
get(String key,
Object criteria,
Timestamp timestamp)
For every record that matches the
criteria, return the
stored value in the key field that was most recently added at
timestamp. |
abstract <T> Map<Long,T> |
get(String key,
String ccl)
For every record that matches the
ccl filter, return the
stored value in the key field that was most recently added. |
abstract <T> Map<Long,T> |
get(String key,
String ccl,
Timestamp timestamp)
For every record that matches the
ccl filter, return the
stored value in the key field that was most recently added at
timestamp. |
abstract <T> Map<Long,Map<String,T>> |
get(String ccl,
Timestamp timestamp)
For every key in every record that matches the
ccl filter,
return the stored value that was most recently added. |
abstract String |
getServerEnvironment()
Return the name of the connected environment.
|
abstract String |
getServerVersion()
Return the version of the connected server.
|
Set<Long> |
insert(Collection<Multimap<String,Object>> data)
Atomically insert the key/value associations from each of the
maps in data into new and distinct records. |
long |
insert(Map<String,Object> data)
Atomically insert the key/value associations from
data into a
new record. |
Map<Long,Boolean> |
insert(Map<String,Object> data,
Collection<Long> records)
Atomically insert the key/value associations from
data into
each of the records, if possible. |
boolean |
insert(Map<String,Object> data,
long record)
Atomically insert the key/value associations from
data into
record, if possible. |
long |
insert(Multimap<String,Object> data)
Atomically insert the key/value associations from
Multimap data
into a new record. |
Map<Long,Boolean> |
insert(Multimap<String,Object> data,
Collection<Long> records)
Atomically insert the key/value associations from
Multimap data
into each of the records, if possible. |
boolean |
insert(Multimap<String,Object> data,
long record)
Atomically insert the key/value associations in
data
into record, if possible. |
abstract Set<Long> |
insert(String json)
Atomically insert the key/value associations from the
json string
into as many new records as necessary. |
abstract Map<Long,Boolean> |
insert(String json,
Collection<Long> records)
Atomically insert the key/value associations from the
json object
into each of the records, if possible. |
abstract boolean |
insert(String json,
long record)
Atomically insert the key/value associations from the
json object
into record, if possible. |
abstract Set<Long> |
inventory()
Return all the records that have current or historical data.
|
abstract <T> T |
invokePlugin(String id,
String method,
Object... args)
Invoke
method using args within the plugin identified by
id. |
abstract String |
jsonify(Collection<Long> records)
Atomically dump the data in each of the
records as a JSON array
of objects. |
abstract String |
jsonify(Collection<Long> records,
boolean identifier)
Atomically dump the data in each of the
records as a JSON array
of objects and optionally include a special identifier key that
contains the record id for each of the dumped objects. |
abstract String |
jsonify(Collection<Long> records,
Timestamp timestamp)
Atomically dump the data in each of the
records at
timestamp as a JSON array of objects. |
abstract String |
jsonify(Collection<Long> records,
Timestamp timestamp,
boolean identifier)
Atomically dump the data in each of the
records at
timestamp as a JSON array of objects and optionally include a
special identifier key that contains the record id for each of
the dumped objects. |
abstract String |
jsonify(long record)
Atomically dump all the data in
record as a JSON object. |
abstract String |
jsonify(long record,
boolean identifier)
Atomically dump all the data in
record as a JSON object and
optionally include a special identifier key that contains the
record id. |
abstract String |
jsonify(long record,
Timestamp timestamp)
Atomically dump all the data in
record at timestamp as a
JSON object. |
abstract String |
jsonify(long record,
Timestamp timestamp,
boolean identifier)
Atomically dump all the data in
record at timestamp as a
JSON object and optionally include a special identifier key that
contains the record id. |
abstract Map<Long,Boolean> |
link(String key,
Collection<Long> destinations,
long source)
Append links from
key in source to each of the
destinations. |
abstract boolean |
link(String key,
long destination,
long source)
Append a link from
key in source to destination. |
Manager |
manage()
Return a
Manager to perform management operations to the
connected Concourse Server deployment. |
abstract <T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
Collection<Long> records)
Traverse the document-graph along each of the navigation
keys,
starting at each of the records and return the data contained at
each of the destinations. |
abstract <T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
Collection<Long> records,
Timestamp timestamp)
Traverse the document-graph at
timestamp along each of the
navigation keys, starting at each of the records and
return the data contained at each of the destinations at
timestamp. |
abstract <T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
Criteria criteria)
Traverse the document-graph along each of the navigation
keys,
starting at each of the records that match the criteria and
return the data contained at each of the destinations. |
abstract <T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
Criteria criteria,
Timestamp timestamp)
Traverse the document-graph at
timestamp along each of the
navigation keys, starting at each of the records that matched the
criteria and return the data contained at each of the
destinations at timestamp. |
abstract <T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
long record)
Traverse the document-graph along each of the navigation
keys,
starting at record and return the data contained at each of the
destinations. |
abstract <T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
long record,
Timestamp timestamp)
Traverse the document-graph at
timestamp along each of the
navigation keys, starting at record and return the data
contained at each of the destinations at timestamp. |
<T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
Object criteria)
Traverse the document-graph along each of the navigation
keys,
starting at each of the records that match the criteria and
return the data contained at each of the destinations. |
<T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
Object criteria,
Timestamp timestamp)
Traverse the document-graph at
timestamp along each of the
navigation keys, starting at each of the records that matched the
criteria and return the data contained at each of the
destinations at timestamp. |
abstract <T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
String ccl)
Traverse the document-graph along each of the navigation
keys,
starting at each of the records that match the criteria and
return the data contained at each of the destinations. |
abstract <T> Map<Long,Map<String,Set<T>>> |
navigate(Collection<String> keys,
String ccl,
Timestamp timestamp)
Traverse the document-graph at
timestamp along each of the
navigation keys, starting at each of the records that matched the
criteria and return the data contained at each of the
destinations at timestamp. |
abstract <T> Map<Long,Set<T>> |
navigate(String key,
Collection<Long> records)
Return all values stored for
key in each of the records. |
abstract <T> Map<Long,Set<T>> |
navigate(String key,
Collection<Long> records,
Timestamp timestamp)
Return all values stored for
key in each of the records
at timestamp.Navigates through the key splited with dot(.)
operator. |
abstract <T> Map<Long,Set<T>> |
navigate(String key,
Criteria criteria)
Return all the values stored for
key in every record that
matches the Criteria filter. |
abstract <T> Map<Long,Set<T>> |
navigate(String key,
Criteria criteria,
Timestamp timestamp)
Return all the values stored for
key in every record that
matches the Criteria filter. |
abstract <T> Map<Long,Set<T>> |
navigate(String key,
long record)
Return all the values stored for
key in record.Iterates
through the key splitted with dot(.) operator. |
<T> Map<Long,Set<T>> |
navigate(String key,
Long record)
Return all the values stored for
key in record.Iterates
through the key splitted with dot(.) operator. |
abstract <T> Map<Long,Set<T>> |
navigate(String key,
long record,
Timestamp timestamp)
Return all the values stored for
key in record at
timestamp. |
<T> Map<Long,Set<T>> |
navigate(String key,
Long record,
Timestamp timestamp)
Return all the values stored for
key in record at
timestamp. |
<T> Map<Long,Set<T>> |
navigate(String key,
Object criteria)
Return all the values stored for
key in every record that
matches the Criteria filter. |
<T> Map<Long,Set<T>> |
navigate(String key,
Object criteria,
Timestamp timestamp)
Return all the values stored for
key in every record that
matches the Criteria filter. |
abstract <T> Map<Long,Set<T>> |
navigate(String key,
String ccl)
Return all the values stored for
key in every record that
matches the ccl filter. |
abstract <T> Map<Long,Set<T>> |
navigate(String key,
String ccl,
Timestamp timestamp)
Return all the values stored for
key in every record that
matches the ccl filter. |
abstract Map<Long,Boolean> |
ping(Collection<Long> records)
Atomically check to see if each of the
records currently contains
any data. |
abstract boolean |
ping(long record)
Check to see if
record currently contains any data. |
abstract <T> void |
reconcile(String key,
long record,
Collection<T> values)
Make the necessary changes to the data stored for
key in
record so that it contains the exact same values as the
specified collection. |
<T> void |
reconcile(String key,
long record,
T... values)
Make the necessary changes to the data stored for
key in
record so that it contains the exact same values as the
specified array. |
abstract <T> Map<Long,Boolean> |
remove(String key,
T value,
Collection<Long> records)
Atomically remove
key as value from each of the
records where it currently exists. |
abstract <T> boolean |
remove(String key,
T value,
long record)
Remove
key as value from record if it currently
exists. |
abstract void |
revert(Collection<String> keys,
Collection<Long> records,
Timestamp timestamp)
Atomically revert each of the
keys in each of the records
to their state at timestamp by creating new revisions that undo
the net changes that have occurred since timestamp. |
abstract void |
revert(Collection<String> keys,
long record,
Timestamp timestamp)
Atomically revert each of the
keys in record to their
state at timestamp by creating new revisions that undo the net
changes that have occurred since timestamp. |
abstract void |
revert(String key,
Collection<Long> records,
Timestamp timestamp)
Atomically revert
key in each of the records to its state
at timestamp by creating new revisions that undo the net
changes that have occurred since timestamp. |
abstract void |
revert(String key,
long record,
Timestamp timestamp)
Atomically revert
key in record to its state at
timestamp by creating new revisions that undo the net
changes that have occurred since timestamp. |
abstract Set<Long> |
search(String key,
String query)
|
abstract Map<Long,Map<String,Set<Object>>> |
select(Collection<Long> records)
Return all the data that is currently stored in each of the
records. |
abstract Map<Long,Map<String,Set<Object>>> |
select(Collection<Long> records,
Timestamp timestamp)
Return all the data that was stored in each of the
records at
timestamp. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Collection<String> keys,
Collection<Long> records)
Return all the values stored for each of the
keys in each of the
records. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Collection<String> keys,
Collection<Long> records,
Timestamp timestamp)
Return all the values stored for each of the
keys in each of the
records at timestamp. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Collection<String> keys,
Criteria criteria)
Return all the values stored for each of the
keys in every record
that matches the criteria. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Collection<String> keys,
Criteria criteria,
Timestamp timestamp)
Return all the values stored for each of the
keys at
timestamp in every record that matches the criteria |
abstract <T> Map<String,Set<T>> |
select(Collection<String> keys,
long record)
Return all the values stored for each of the
keys in
record. |
abstract <T> Map<String,Set<T>> |
select(Collection<String> keys,
long record,
Timestamp timestamp)
Return all the values stored for each of the
keys in
record at timestamp. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Collection<String> keys,
Object criteria)
Return all the values stored for each of the
keys in every record
that matches the criteria. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Collection<String> keys,
Object criteria,
Timestamp timestamp)
Return all the values stored for each of the
keys at
timestamp in every record that matches the criteria. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Collection<String> keys,
String ccl)
Return all the values stored for each of the
keys in every record
that matches the ccl filter. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Collection<String> keys,
String ccl,
Timestamp timestamp)
Return all the values stored for each of the
keys at
timestamp in every record that matches the ccl filter. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Criteria criteria)
Return all the data from every record that matches
criteria. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Criteria criteria,
Timestamp timestamp)
Return all the data at
timestamp from every record that
matches the criteria. |
abstract Map<String,Set<Object>> |
select(long record)
Return all the data from
record. |
Map<String,Set<Object>> |
select(Long record)
Return all the data from
record. |
abstract Map<String,Set<Object>> |
select(long record,
Timestamp timestamp)
Return all the data from
record at timestamp. |
Map<String,Set<Object>> |
select(Long record,
Timestamp timestamp)
Return all the data from
record at timestamp. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Object criteria)
Return all the data from every record that matches
criteria. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(Object criteria,
Timestamp timestamp)
Return all the data at
timestamp from every record that
matches the criteria. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(String ccl)
Return all the data from every record that matches
ccl filter. |
abstract <T> Map<Long,Set<T>> |
select(String key,
Collection<Long> records)
Return all values stored for
key in each of the records. |
abstract <T> Map<Long,Set<T>> |
select(String key,
Collection<Long> records,
Timestamp timestamp)
Return all values stored for
key in each of the records
at timestamp. |
abstract <T> Map<Long,Set<T>> |
select(String key,
Criteria criteria)
Return all the values stored for
key in every record that
matches the criteria. |
abstract <T> Map<Long,Set<T>> |
select(String key,
Criteria criteria,
Timestamp timestamp)
Return all the values stored for
key at timestamp in
every record that matches the criteria. |
abstract <T> Set<T> |
select(String key,
long record)
Return all the values stored for
key in record. |
<T> Set<T> |
select(String key,
Long record)
Return all the values stored for
key in record. |
abstract <T> Set<T> |
select(String key,
long record,
Timestamp timestamp)
Return all the values stored for
key in record at
timestamp. |
<T> Set<T> |
select(String key,
Long record,
Timestamp timestamp)
Return all the values stored for
key in record at
timestamp. |
abstract <T> Map<Long,Set<T>> |
select(String key,
Object criteria)
Return all the values stored for
key in every record that
matches the criteria. |
abstract <T> Map<Long,Set<T>> |
select(String key,
Object criteria,
Timestamp timestamp)
Return all the values stored for
key at timestamp in
every record that matches the criteria. |
abstract <T> Map<Long,Set<T>> |
select(String key,
String ccl)
Return all the values stored for
key in every record that
matches the ccl filter. |
abstract <T> Map<Long,Set<T>> |
select(String key,
String ccl,
Timestamp timestamp)
Return all the values stored for
key at timestamp in
every record that matches the ccl filter. |
abstract <T> Map<Long,Map<String,Set<T>>> |
select(String ccl,
Timestamp timestamp)
Return all the data at
timestamp from every record that
matches the ccl filter. |
abstract void |
set(String key,
Object value,
Collection<Long> records)
In each of the
records, atomically remove all the values stored
for key and then add key as value in the
respective record. |
abstract <T> void |
set(String key,
T value,
long record)
Atomically remove all the values stored for
key in record
and add then key as value. |
abstract void |
stage()
Start a new transaction.
|
boolean |
stage(Runnable task)
Execute
task within a new transaction. |
abstract Timestamp |
time()
Return a
Timestamp that represents the current instant according
to the server. |
Timestamp |
time(long micros)
Return a
Timestamp that corresponds to the specified number of
microseconds since the Unix epoch. |
Timestamp |
time(Number micros)
Return the
Timestamp that corresponds to the specified number of
microseconds since the Unix epoch. |
abstract Timestamp |
time(String phrase)
Return the
Timestamp, according to the server, that corresponds
to the instant described by the phrase. |
abstract boolean |
unlink(String key,
long destination,
long source)
If it exists, remove the link from
key in source to
destination. |
abstract boolean |
verify(String key,
Object value,
long record)
Return
true if value is stored for key in
record. |
abstract boolean |
verify(String key,
Object value,
long record,
Timestamp timestamp)
Return
true if value was stored for key in
record at timestamp. |
abstract boolean |
verifyAndSwap(String key,
Object expected,
long record,
Object replacement)
Atomically replace
expected with replacement for
key in record if and only if expected is
currently stored in the field. |
abstract void |
verifyOrSet(String key,
Object value,
long record)
Atomically verify that
key equals expected in
record or set it as such. |
public static Concourse connect()
./concourse_client.prefs (or, if the file does not exist, the
default environment of the server at localhost:1717) and return a handle
to facilitate interaction.public static Concourse connect(String environment)
environment of the
Concourse deployment described in ~/concourse_client.prefs (or,
if the file does not exist, the server at localhost:1717) and return a
handle to facilitate interaction.environment - the environment to usepublic static Concourse connect(String host, int port, String username, String password)
host - the server hostport - the listener port for client connectionsusername - the name of the user on behalf of whom to connectpassword - the password for the usernamepublic static Concourse connect(String host, int port, String username, String password, String environment)
environment of the
specified Concourse Server and return a handle to facilitate interaction.host - the server hostport - the listener port for client connectionsusername - the name of the user on behalf of whom to connectpassword - the password for the usernameenvironment - the name of the environment to use for the
connectionpublic static Concourse connectWithPrefs(String file)
file.file - the absolute path to the prefs file that contains the
information for the Concourse deployment (relative paths will
resolve to the user's home directory)public static Concourse copyExistingConnection(Concourse concourse)
concourse handle.concourse - an existing Concourse connection handlepublic abstract void abort()
After returning, the driver will return to autocommit mode and
all subsequent changes will be committed immediately.
Calling this method when the driver is not in staging mode is a
no-op.
public abstract <T> long add(String key, T value)
key as value in a new record.key - the field namevalue - the value to addpublic abstract <T> Map<Long,Boolean> add(String key, T value, Collection<Long> records)
key as value in each of the
records where it doesn't exist.key - the field namevalue - the value to addrecords - a collection of record ids where an attempt is made to
add the dataMap associating each record id to a boolean that
indicates if the data was addedpublic abstract <T> boolean add(String key, T value, long record)
key as value in record if and only if it
doesn't exist.key - the field namevalue - the value to addrecord - the record id where an attempt is made to add the datapublic abstract Map<Timestamp,String> audit(long record)
record.public abstract Map<Timestamp,String> audit(long record, Timestamp start)
record since start
(inclusive).record - the record idstart - an inclusive Timestamp of the oldest change that
should possibly be included in the audit – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating the Timestamp of each change
to the respective description of the changepublic abstract Map<Timestamp,String> audit(long record, Timestamp start, Timestamp end)
record between
start (inclusive) and end (non-inclusive).record - the record idstart - an inclusive Timestamp for the oldest change that
should possibly be included in the audit – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectend - a non-inclusive Timestamp for the most recent change
that should possibly be included in the audit – created from
either a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating the Timestamp of each change
to the respective description of the changepublic abstract Map<Timestamp,String> audit(String key, long record)
key field in
recordpublic abstract Map<Timestamp,String> audit(String key, long record, Timestamp start)
key field in
record since start (inclusive).key - the field namerecord - the record idstart - an inclusive Timestamp for the oldest change that
should possibly be included in the audit – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating the Timestamp of each change
to the respective description of the changepublic abstract Map<Timestamp,String> audit(String key, long record, Timestamp start, Timestamp end)
key field in
record between start (inclusive) and end
(non-inclusive).key - the field namerecord - the record idstart - an inclusive Timestamp for the oldest change that
should possibly be included in the audit – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectend - a non-inclusive Timestamp for the most recent change
that should possibly be included in the audit – created from
either a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating the Timestamp of each change
to the respective description of the changepublic abstract Map<String,Map<Object,Set<Long>>> browse(Collection<String> keys)
keys.public abstract Map<String,Map<Object,Set<Long>>> browse(Collection<String> keys, Timestamp timestamp)
keys at timestamp.keys - a collection of field namestimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the keys to a
another Map associating each indexed value to the
Set of records that contained that value in the
key field at timestamppublic abstract Map<Object,Set<Long>> browse(String key)
key.public abstract Map<Object,Set<Long>> browse(String key, Timestamp timestamp)
key at timestamp.key - the field nametimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each indexed value to the Set
of records that contained that value in the key field at
timestamppublic Calculator calculate()
Calculator to use for calculations across data.Calculatorpublic Object calculate(String method, Object... args)
method using the provided
args.method - the name of the calculation method in the
Calculator interfaceargs - the args to pass to the methodpublic abstract Map<Timestamp,Set<Object>> chronologize(String key, long record)
key in record after every change made to the field.public abstract Map<Timestamp,Set<Object>> chronologize(String key, long record, Timestamp start)
start (inclusive) and the present
that contains a snapshot of the values stored for key in
record after every change made to the field during the time span.key - the field namerecord - the record idstart - the first possible Timestamp to include in the
time series – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating the Timestamp of each change to
the Set of values that were stored in the field after
that changepublic abstract Map<Timestamp,Set<Object>> chronologize(String key, long record, Timestamp start, Timestamp end)
start (inclusive) and end
(non-inclusive) that contains a snapshot of the values stored for
key in record after every change made to the field during
the time span.key - the field namerecord - the record idstart - the first possible Timestamp to include in the
time series – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectend - the Timestamp that should be greater than every
timestamp in the time series – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating the Timestamp of each change to
the Set of values that were stored in the field after
that changepublic abstract void clear(Collection<Long> records)
records.records - a collection of record idspublic abstract void clear(Collection<String> keys, Collection<Long> records)
keys in
each of the records.keys - a collection of field namesrecords - a collection of record ids.public abstract void clear(Collection<String> keys, long record)
keys in
record.keys - a collection of field namesrecord - the record idpublic abstract void clear(long record)
record.record - the record idpublic abstract void clear(String key, Collection<Long> records)
key in each of the
records.key - the field namerecords - a collection of record idspublic abstract void clear(String key, long record)
key in recordkey - the field namerecord - the record idpublic final void close()
An alias for the exit() method.
close in interface AutoCloseablepublic abstract boolean commit()
true if and only if all the changes can be
applied. Otherwise, returns false and all the changes are
discarded.
After returning, the driver will return to autocommit mode and
all subsequent changes will be committed immediately.
This method will return false if it is called when the driver is
not in staging mode.
true if all staged changes are committed, otherwise
falsepublic abstract Set<String> describe()
Set of keys in the databasepublic abstract Map<Long,Set<String>> describe(Collection<Long> records)
records, return all of the keys that have at
least one value.public abstract Map<Long,Set<String>> describe(Collection<Long> records, Timestamp timestamp)
records, return all the keys that had at least
one value at timestamp.records - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the records to the
Set of keys that were in that record at timestamppublic abstract Set<String> describe(long record)
record that have at least one value.record - the record idSet of keys in recordpublic abstract Set<String> describe(long record, Timestamp timestamp)
record that had at least one value at
timestamp.record - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectSet of keys that were in record at
timestamppublic abstract Set<String> describe(Timestamp timestamp)
timestamp.Set of keys in the database at timestamppublic abstract <T> Map<String,Map<Diff,Set<T>>> diff(long record, Timestamp start)
record since
start.
If you begin with the state of the record at start and
re-apply all the changes in the diff, you'll re-create the state of the
record at the present.
Unlike the audit method,
diff does not necessarily reflect ALL the
changes made to record during the time span.
record - the record idstart - the base timestamp from which the diff is calculatedMap associating each key in the record to
another Map associating a change
description to the Set of values that fit the
description (i.e.
{"key": {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}}
)public abstract <T> Map<String,Map<Diff,Set<T>>> diff(long record, Timestamp start, Timestamp end)
record from start
to end.
If you begin with the state of the record at start and
re-apply all the changes in the diff, you'll re-create the state of the
same record at end.
Unlike the audit method,
diff does not necessarily reflect ALL the
changes made to record during the time span.
record - the record idstart - the base timestamp from which the diff is calculatedend - the comparison timestamp to which the diff is calculatedMap associating each key in the record to
another Map associating a change
description to the Set of values that fit the
description (i.e.
{"key": {ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}}
)public abstract <T> Map<Diff,Set<T>> diff(String key, long record, Timestamp start)
key in record since
start.
If you begin with the state of the field at start and re-apply
all the changes in the diff, you'll re-create the state of the same field
at the present.
public abstract <T> Map<Diff,Set<T>> diff(String key, long record, Timestamp start, Timestamp end)
key in record
from start to end.
If you begin with the state of the field at start and re-apply
all the changes in the diff, you'll re-create the state of the same field
at end.
key - the field namerecord - the record idstart - the base timestamp from which the diff is calculatedend - the comparison timestamp to which the diff is calculatedMap associating a change
description to the Set of values that fit the
description (i.e.
{ADDED: ["value1", "value2"], REMOVED: ["value3", "value4"]}
)public abstract <T> Map<T,Map<Diff,Set<Long>>> diff(String key, Timestamp start)
key field across all
records since start.
If you begin with the state of the inverted index for key at
start and re-apply all the changes in the diff, you'll re-create
the state of the same index at the present.
Unlike the audit method,
diff does not necessarily reflect ALL the
changes made to key in record during the time span.
key - the field namestart - the base timestamp from which the diff is calculatedMap associating each value stored for key
across all records to another Map that associates a
change description to the Set of records
where the description applies to that value in the key
field (i.e.
{"value1": {ADDED: [1, 2], REMOVED: [3, 4]}}
)public abstract <T> Map<T,Map<Diff,Set<Long>>> diff(String key, Timestamp start, Timestamp end)
key field across all
records from start to end.
If you begin with the state of the inverted index for key at
start and re-apply all the changes in the diff, you'll re-create
the state of the same index at end.
Unlike the audit
method, diff does not necessarily return
ALL the changes made to key in record during the time
span.
key - the field namestart - the base timestamp from which the diff is calculatedend - the comparison timestamp to which the diff is calculatedMap associating each value stored for key
across all records to another Map that associates a
change description to the Set of records
where the description applies to that value in the key
field (i.e.
{"value1": {ADDED: [1, 2], REMOVED: [3, 4]}}
)public abstract void exit()
public abstract Set<Long> find(Criteria criteria)
criteria.criteria - a Criteria that contains a well-formed filter for
the desired recordscriteriapublic abstract Set<Long> find(Object criteria)
criteria.
This method is syntactic sugar for find(Criteria). The only
difference is that this method takes a in-process Criteria
building sequence for convenience.
criteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired recordscriteriapublic abstract Set<Long> find(String ccl)
ccl filter.ccl - a well-formed criteria expressed using the Concourse Criteria
Languagepublic abstract Set<Long> find(String key, Object value)
key equals value.
This method is a shortcut for calling
find(String, Operator, Object) with Operator.EQUALS.
key - the field namevalue - the value that must exist in the key field for the
record to matchkey = valuepublic abstract Set<Long> find(String key, Object value, Timestamp timestamp)
key was equal to value at timestamp.
This method is a shortcut for calling
find(String, Operator, Object, Timestamp) with
Operator.EQUALS.
key - the field namevalue - the value that must exist in the key field for the
record to matchtimestamp - a Timestamp that represents the historical
instant to use when checking for matches – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectkey was equal to value at
timestamppublic abstract Set<Long> find(String key, Operator operator, Object value)
records where the key field contains at
least one value that satisfies the operator in relation to the
value.key - the field nameoperator - the Operator to use when comparing the specified
value to those stored across the key field
while determining which records are matchesvalue - the comparison value for the operatorpublic abstract Set<Long> find(String key, Operator operator, Object value, Object value2)
records where the key field contains at
least one value that satisfies the operator in relation to
value and value2.key - the field nameoperator - the Operator to use when comparing the specified
values to those stored across the key field while
determining which records are matchesvalue - the first comparison value for the operatorvalue2 - the second comparison value for the operatorpublic abstract Set<Long> find(String key, Operator operator, Object value, Object value2, Timestamp timestamp)
records where the key field contained
at least one value at timestamp that satisfies the
operator in relation to value and value2.key - the field nameoperator - the Operator to use when comparing the specified
values to those stored across the key field while
determining which records are matchesvalue - the first comparison value for the operatorvalue2 - the second comparison value for the operatortimestamp - a Timestamp that represents the historical
instant to use when checking for matches – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectpublic abstract Set<Long> find(String key, Operator operator, Object value, Timestamp timestamp)
records where the key field contained
at least one value at that satisfies the operator in
relation to the value.key - the field nameoperator - the Operator to use when comparing the specified
value to those stored across the key field
while determining which records are matchesvalue - the comparison value for the operatortimestamp - a Timestamp that represents the historical
instant to use when checking for matches – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectpublic abstract Set<Long> find(String key, String operator, Object value)
records where the key field contains at
least one value that satisfies the operator in relation to the
value.key - the field nameoperator - a valid description of an Operator to use when comparing the
specified value to those stored across the key
field while determining which records are matchesvalue - the comparison value for the operatorpublic abstract Set<Long> find(String key, String operator, Object value, Object value2)
records where the key field contains at
least one value that satisfies the operator in relation to
value and value2.key - the field nameoperator - a valid description of an Operator to use when comparing the
specified value to those stored across the key
field while determining which records are matchesvalue - the first comparison value for the operatorvalue2 - the second comparison value for the operatorpublic abstract Set<Long> find(String key, String operator, Object value, Object value2, Timestamp timestamp)
records where the key field contained
at least one value at timestamp that satisfies the
operator in relation to value and value2.key - the field nameoperator - a valid description of an Operator to use when comparing the
specified value to those stored across the key
field while determining which records are matchesvalue - the first comparison value for the operatorvalue2 - the second comparison value for the operatortimestamp - a Timestamp that represents the historical
instant to use when checking for matches – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectpublic abstract Set<Long> find(String key, String operator, Object value, Timestamp timestamp)
records where the key field contained
at least one value at timestamp that satisfies the
operator in relation to the value.key - the field nameoperator - a valid description of an Operator to use when comparing the
specified value to those stored across the key
field while determining which records are matchesvalue - the comparison value for the operatortimestamp - a Timestamp that represents the historical
instant to use when checking for matches – created from either
a natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectpublic abstract <T> long findOrAdd(String key, T value) throws DuplicateEntryException
key equals
value, or throw a DuplicateEntryException if multiple
records match the condition. If no record matches,
add key as value into an new
record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only adds data if that condition isn't currently satisfied.
key - the field namevalue - the value that must exist in the key field of a
single record for that record to match or the value that is
added to the key field in a new record if no existing
record matches the conditionkey = value, if one exist
or the record where the key as value is addedDuplicateEntryExceptionpublic final long findOrInsert(BuildableState criteria, Map<String,Object> data) throws DuplicateEntryException
criteria, if
one exist or throw a DuplicateEntryException if multiple records
match. If no record matches, insert(Map) the data into a
new record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
This method is syntactic sugar for findOrInsert(Criteria, Map).
The only difference is that this method takes a in-process
Criteria building sequence for convenience.
criteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired recorddata - a Map with key/value associations to insert into the
new recordcriteria, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic final long findOrInsert(BuildableState criteria, Multimap<String,Object> data) throws DuplicateEntryException
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. If
no record matches, insert(Multimap) the data into a new
record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
This method is syntactic sugar for
findOrInsert(Criteria, Multimap). The only difference is that
this method takes a in-process Criteria building sequence for
convenience.
criteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recorddata - a Multimap with key/value associations to insert into
the new recordcriteria, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic long findOrInsert(BuildableState criteria, String json) throws DuplicateEntryException
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. If
no record matches, insert(String) the json into a new
record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
This method is syntactic sugar for
findOrInsert(Criteria, String). The only difference is that this
method takes a in-process Criteria building sequence for
convenience.
criteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordjson - a JSON blob describing a single objectcriteria, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic final long findOrInsert(Criteria criteria, Map<String,Object> data) throws DuplicateEntryException
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. If
no record matches, insert(Map) the data into a
new record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
criteria - a Criteria that contains a well-formed filter for
the desired recorddata - a Map with key/value associations to insert into the
new recordcriteria, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic final long findOrInsert(Criteria criteria, Multimap<String,Object> data) throws DuplicateEntryException
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. If
no record matches, insert(Multimap) the data into a new
record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
criteria - a Criteria that contains a well-formed filter for
the desired recorddata - a Multimap with key/value associations to insert into
the new recordcriteria, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic abstract long findOrInsert(Criteria criteria, String json) throws DuplicateEntryException
criteria, if one exist
or throw a DuplicateEntryException if multiple records match. If
no record matches, insert(String) the json into a new
record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
criteria - a Criteria that contains a well-formed filter for
the desired recorddata - a JSON blob describing a single objectcriteria, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic final long findOrInsert(String ccl, Map<String,Object> data) throws DuplicateEntryException
ccl filter, if one
exist or throw a DuplicateEntryException if multiple records
match. If no record matches, insert(Map) the data into a
new record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
ccl - a well-formed criteria expressed using the Concourse Criteria
Languagedata - a Map with key/value associations to insert into the
new recordcriteria, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic final long findOrInsert(String ccl, Multimap<String,Object> data) throws DuplicateEntryException
ccl filter, if one
exist or throw a DuplicateEntryException if multiple records
match. If no record matches, insert(Multimap) the data
into a new record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
ccl - a well-formed criteria expressed using the Concourse Criteria
Languagedata - a Multimap with key/value associations to insert into
the new recordcriteria, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic abstract long findOrInsert(String ccl, String json) throws DuplicateEntryException
ccl filter, if one
exist or throw a DuplicateEntryException if multiple records
match. If no record matches, insert(String) the json
into a new record and return the id.
This method can be used to simulate a unique index because it atomically checks for a condition and only inserts data if that condition isn't currently satisfied.
ccl - a well-formed criteria expressed using the Concourse Criteria
Languagejson - a JSON blob describing a single objectccl string, if one exist
or the record where the json data is insertedDuplicateEntryExceptionpublic abstract <T> Map<Long,Map<String,T>> get(Collection<String> keys, Collection<Long> records)
keys in each of the records, return the
stored value that was most recently added.public abstract <T> Map<Long,Map<String,T>> get(Collection<String> keys, Collection<Long> records, Timestamp timestamp)
keys in each of the records, return the
stored value that was most recently added at timestamp.keys - a collection of field namesrecords - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the records to another
Map associating each of the keys to the freshest
value in the field at timestamppublic abstract <T> Map<Long,Map<String,T>> get(Collection<String> keys, Criteria criteria)
keys in every record that matches the
criteria, return the stored value that was most recently
added.public abstract <T> Map<Long,Map<String,T>> get(Collection<String> keys, Criteria criteria, Timestamp timestamp)
keys in every record that matches the
criteria, return the stored value that was most recently
added at timestamp.keys - a collection of field namescriteria - a Criteria that contains a well-formed filter for
the desired recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys to the freshest
value in the field at timestamppublic abstract <T> Map<String,T> get(Collection<String> keys, long record)
keys in record, return the stored value
that was most recently added.keys - a collection of field namesrecord - the record idMap associating each of the keys to the
freshest value in the fieldpublic abstract <T> Map<String,T> get(Collection<String> keys, long record, Timestamp timestamp)
keys in record, return the stored value
that was most recently added at timestamp.keys - a collection of field namesrecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the keys to the
freshest
value in the field at timestamppublic abstract <T> Map<Long,Map<String,T>> get(Collection<String> keys, Object criteria)
keys in every record that matches the
criteria, return the stored value that was most recently
added.
This method is syntactic sugar for get(Collection, Criteria).
The only difference is that this method takes a in-process
Criteria building sequence for convenience.
keys - a collection of field namescriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordsMap associating each of the matching records to another
Map associating each of the keys to the freshest
value in the fieldpublic abstract <T> Map<Long,Map<String,T>> get(Collection<String> keys, Object criteria, Timestamp timestamp)
keys in every record that matches the
criteria, return the stored value that was most recently
added at timestamp.
This method is syntactic sugar for
get(Collection, Criteria, Timestamp). The only difference is
that this method takes a in-process Criteria building sequence
for convenience.
keys - a collection of field namescriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys to the freshest
value in the field at timestamppublic abstract <T> Map<Long,Map<String,T>> get(Collection<String> keys, String ccl)
keys in every record that matches the ccl
filter, return the stored value that was most recently added.public abstract <T> Map<Long,Map<String,T>> get(Collection<String> keys, String ccl, Timestamp timestamp)
keys in every record that matches the ccl
filter, return the stored value that was most recently added at
timestamp.keys - a collection of field namesccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys to the freshest
value in the field at timestamppublic abstract <T> Map<Long,Map<String,T>> get(Criteria criteria)
criteria, return
the stored value that was most recently added.public abstract <T> Map<Long,Map<String,T>> get(Criteria criteria, Timestamp timestamp)
criteria, return
the stored value that was most recently added at timestamp .criteria - a Criteria that contains a well-formed filter for
the desired recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the record's keys to the freshest
value in the field at timestamppublic abstract <T> Map<Long,Map<String,T>> get(Object criteria)
criteria, return
the stored value that was most recently added.criteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordsMap associating each of the matching records to another
Map associating each of the record's keys to the freshest
value in the fieldpublic abstract <T> Map<Long,Map<String,T>> get(Object criteria, Timestamp timestamp)
criteria, return
the stored value that was most recently added at timestamp.criteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the record's keys to the freshest
value in the field at timestamppublic abstract <T> Map<Long,Map<String,T>> get(String ccl)
ccl filter, return
the stored value that was most recently added.public abstract <T> Map<Long,T> get(String key, Collection<Long> records)
records, return the stored value in the
key field that was most recently added.key - the field namerecords - a collection of record idsMap associating each of the records to the
freshest value in the key fieldpublic abstract <T> Map<Long,T> get(String key, Collection<Long> records, Timestamp timestamp)
records, return the stored value in the
key field that was most recently added at timestampkey - the field namerecords - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the records to the
freshest value in the key field at timestamppublic abstract <T> Map<Long,T> get(String key, Criteria criteria)
criteria, return the stored
value in the key field that was most recently added.public abstract <T> Map<Long,T> get(String key, Criteria criteria, Timestamp timestamp)
criteria, return the
stored value in the key field that was most recently added at
timestamp.key - the field namecriteria - a Criteria that contains a well-formed filter for
the desired recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to the
freshest value in the key field@Nullable public abstract <T> T get(String key, long record)
key in
record. If the field is empty, return null.key - the field namerecord - the record id@Nullable public abstract <T> T get(String key, long record, Timestamp timestamp)
key in
record at timestamp. If the field was empty at
timestamp, return null.key - the field namerecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objecttimestamp@Nullable public final <T> T get(String key, Long record)
key in
record. If the field is empty, return null.key - the field namerecord - the record id@Nullable public final <T> T get(String key, Long record, Timestamp timestamp)
key in
record at timestamp. If the field was empty at
timestamp, return null.key - the field namerecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objecttimestamppublic abstract <T> Map<Long,T> get(String key, Object criteria)
criteria, return the stored
value in the key field that was most recently added.
This method is syntactic sugar for get(String, Criteria). The
only difference is that this method takes a in-process Criteria
building sequence for convenience.
criteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordsMap associating each of the matching records to another
Map associating each of the record's keys to the freshest
value in the fieldpublic abstract <T> Map<Long,T> get(String key, Object criteria, Timestamp timestamp)
criteria, return the
stored value in the key field that was most recently added at
timestamp.
This method is syntactic sugar for
get(String, Criteria, Timestamp). The only difference is that
this method takes a in-process Criteria building sequence for
convenience.
key - the field namecriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to the
freshest value in the key fieldpublic abstract <T> Map<Long,T> get(String key, String ccl)
ccl filter, return the
stored value in the key field that was most recently added.
This method is syntactic sugar for get(String, Criteria). The
only difference is that this method takes a in-process Criteria
building sequence for convenience.
key - the field nameccl - a well-formed criteria expressed using the Concourse Criteria
LanguageMap associating each of the matching records to the
freshest value in the key fieldpublic abstract <T> Map<Long,T> get(String key, String ccl, Timestamp timestamp)
ccl filter, return the
stored value in the key field that was most recently added at
timestamp.
This method is syntactic sugar for
get(String, Criteria, Timestamp). The only difference is that
this method takes a in-process Criteria building sequence for
convenience.
key - the field nameccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to the
freshest value in the key field at timestamppublic abstract <T> Map<Long,Map<String,T>> get(String ccl, Timestamp timestamp)
ccl filter,
return the stored value that was most recently added.ccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the record's keys to the freshest
value in the fieldpublic abstract String getServerEnvironment()
public abstract String getServerVersion()
public final Set<Long> insert(Collection<Multimap<String,Object>> data)
maps in data into new and distinct records.
Each of the values in each map in data must be a primitive or one
dimensional object (e.g. no nested maps or multimaps).
public final long insert(Map<String,Object> data)
data into a
new record.
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
data - a Map with key/value associations to insert into the
new recorddata was insertedpublic final Map<Long,Boolean> insert(Map<String,Object> data, Collection<Long> records)
data into
each of the records, if possible.
An insert will fail for a given record if any of the key/value
associations in data currently exist in that record (e.g.
adding the key/value association would
fail).
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
public final boolean insert(Map<String,Object> data, long record)
data into
record, if possible.
The insert will fail if any of the key/value associations in data
currently exist in record (e.g.
adding the key/value association would
fail).
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
data - a Map with key/value associations to insert into
recordrecord - the record idtrue if all of the data is successfully inserted
into record, otherwise falsepublic final long insert(Multimap<String,Object> data)
Multimap data
into a new record.
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
data - a Multimap with key/value associations to insert into
the new recorddata was insertedpublic final Map<Long,Boolean> insert(Multimap<String,Object> data, Collection<Long> records)
Multimap data
into each of the records, if possible.
An insert will fail for a given record if any of the key/value
associations in data currently exist in that record (e.g.
adding the key/value association would
fail).
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
data - a Multimap with key/value associations to insert into
each of the recordsrecords - a collection of ids for records where the data
should attempt to be insertedMap associating each record id to a boolean that
indicates if the data was successfully inserted in that
recordpublic final boolean insert(Multimap<String,Object> data, long record)
data
into record, if possible.
The insert will fail if any of the key/value associations in data
currently exist in record (e.g.
adding the key/value association would
fail).
Each of the values in data must be a primitive or one dimensional
object (e.g. no nested maps or multimaps).
data - a Multimap with key/value associations to insert into
recordrecord - the record idtrue if all of the data is successfully inserted
into record, otherwise falsepublic abstract Set<Long> insert(String json)
json string
into as many new records as necessary.
If the json string contains a top-level array (of objects), this
method will insert each of the objects in a new and distinct record. The
Set that is returned will contain the ids of all those records.
On the other hand, if the json string contains a single top-level
object, this method will insert that object in a single new record. The
Set that is returned will only contain the id of that record.
Regardless of whether the top-level element is an object or an array,
each object in the json string contains one or more keys, each of
which maps to a JSON primitive or an array of JSON primitives (e.g. no
nested objects or arrays).
json - a valid json string with either a top-level object or arraySet that contains one or more records ids where the
objects in json are inserted, respectivelypublic abstract Map<Long,Boolean> insert(String json, Collection<Long> records)
json object
into each of the records, if possible.
An insert will fail for a given record if any of the key/value
associations in the json object currently exist in that record
(e.g. adding the key/value association
would fail).
The json must contain a top-level object that contains one or
more keys, each of which maps to a JSON primitive or an array of JSON
primitives (e.g. no nested objects or arrays).
json - a valid json string containing a top-level objectrecords - a collection of record idsMap associating each record id to a boolean that
indicates if the json was successfully inserted in that
recordpublic abstract boolean insert(String json, long record)
json object
into record, if possible.
The insert will fail if any of the key/value associations in the
json object currently exist in record (e.g.
adding the key/value association would fail).
The json must contain a JSON object that contains one or more
keys, each of which maps to a JSON primitive or an array of JSON
primitives.
json - json a valid json string containing a top-level objectrecord - the record idtrue if the json is inserted into recordpublic abstract Set<Long> inventory()
Set containing the ids of records that have current or
historical datapublic abstract <T> T invokePlugin(String id, String method, Object... args)
method using args within the plugin identified by
id.
There must be a class named id available in Concourse Server via
a plugin distribution. The method must also be accessible within
the class.
If the plugin throws any Exception, it'll be re-thrown here as a
RuntimeException.
id - the fully qualified name of the plugin class (e.g.
com.cinchapi.plugin.PluginClass)method - the name of the method within the pluginClassargs - the arguments to pass to the methodpublic abstract String jsonify(Collection<Long> records)
records as a JSON array
of objects.records - a collection of record idsrecords, respectivelypublic abstract String jsonify(Collection<Long> records, boolean identifier)
records as a JSON array
of objects and optionally include a special identifier key that
contains the record id for each of the dumped objects.records - a collection of record idsidentifier - a boolean that indicates whether to include a special
key (Constants.JSON_RESERVED_IDENTIFIER_NAME) that
maps to the record id in each of the dumped objectsrecords, respectivelypublic abstract String jsonify(Collection<Long> records, Timestamp timestamp)
records at
timestamp as a JSON array of objects.records - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectrecords at timestamp, respectivelypublic abstract String jsonify(Collection<Long> records, Timestamp timestamp, boolean identifier)
records at
timestamp as a JSON array of objects and optionally include a
special identifier key that contains the record id for each of
the dumped objects.records - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectidentifier - a boolean that indicates whether to include a special
key (Constants.JSON_RESERVED_IDENTIFIER_NAME) that
maps to the record id in each of the dumped objectsrecords at timestamp, respectivelypublic abstract String jsonify(long record)
record as a JSON object.record - the record idrecordpublic abstract String jsonify(long record, boolean identifier)
record as a JSON object and
optionally include a special identifier key that contains the
record id.record - the record ididentifier - a boolean that indicates whether to include a special
key (Constants.JSON_RESERVED_IDENTIFIER_NAME) that
maps to the record id in each of the dumped objectsrecordpublic abstract String jsonify(long record, Timestamp timestamp)
record at timestamp as a
JSON object.record - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectrecord at
timestamppublic abstract String jsonify(long record, Timestamp timestamp, boolean identifier)
record at timestamp as a
JSON object and optionally include a special identifier key that
contains the record id.record - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectidentifier - a boolean that indicates whether to include a special
key (Constants.JSON_RESERVED_IDENTIFIER_NAME) that
maps to the record id in each of the dumped objectsrecord at
timestamppublic abstract Map<Long,Boolean> link(String key, Collection<Long> destinations, long source)
key in source to each of the
destinations.key - the field namedestinations - a collection of ids for the records where each of the
links points, respectivelysource - the id of the record where each of the links originateMap associating the ids for each of the
destinations to a boolean that indicates whether the link
was successfully addedpublic abstract boolean link(String key, long destination, long source)
key in source to destination.key - the field namedestination - the id of the record where the link pointssource - the id of the record where the link originatestrue if the link is addedpublic Manager manage()
Manager to perform management operations to the
connected Concourse Server deployment.management interfacepublic abstract <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, Collection<Long> records)
keys,
starting at each of the records and return the data contained at
each of the destinations.keys - a collection of navigation keysrecords - a collection of record ids from which the navigation
startsMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fieldspublic abstract <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, Collection<Long> records, Timestamp timestamp)
timestamp along each of the
navigation keys, starting at each of the records and
return the data contained at each of the destinations at
timestamp.keys - a collection of navigation keysrecords - a collection of record ids from which the navigation
startstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fields at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, Criteria criteria)
keys,
starting at each of the records that match the criteria and
return the data contained at each of the destinations.keys - a collection of navigation keyscriteria - a Criteria that contains a well-formed filter for
the desired recordsMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fieldspublic abstract <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, Criteria criteria, Timestamp timestamp)
timestamp along each of the
navigation keys, starting at each of the records that matched the
criteria and return the data contained at each of the
destinations at timestamp.keys - a collection of navigation keyscriteria - a Criteria that contains a well-formed filter for
the desired recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fields at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, long record)
keys,
starting at record and return the data contained at each of the
destinations.keys - a collection of navigation keysrecord - the record id from which the navigation startsMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fieldspublic abstract <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, long record, Timestamp timestamp)
timestamp along each of the
navigation keys, starting at record and return the data
contained at each of the destinations at timestamp.keys - a collection of navigation keysrecord - the record id from which the navigation startstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fields at timestamppublic final <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, Object criteria)
keys,
starting at each of the records that match the criteria and
return the data contained at each of the destinations.keys - a collection of navigation keyscriteria - a Criteria that contains a well-formed filter for
the desired recordsMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fieldspublic final <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, Object criteria, Timestamp timestamp)
timestamp along each of the
navigation keys, starting at each of the records that matched the
criteria and return the data contained at each of the
destinations at timestamp.keys - a collection of navigation keyscriteria - a Criteria that contains a well-formed filter for
the desired recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fields at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, String ccl)
keys,
starting at each of the records that match the criteria and
return the data contained at each of the destinations.keys - a collection of navigation keyscriteria - a well-formed criteria expressed using the Concourse
Criteria
LanguageMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fieldspublic abstract <T> Map<Long,Map<String,Set<T>>> navigate(Collection<String> keys, String ccl, Timestamp timestamp)
timestamp along each of the
navigation keys, starting at each of the records that matched the
criteria and return the data contained at each of the
destinations at timestamp.keys - a collection of navigation keyscriteria - a well-formed criteria expressed using the Concourse
Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the destination records
to another Map associating each of the destination
keys to a Set containing all the values stored in
the respective fields at timestamppublic abstract <T> Map<Long,Set<T>> navigate(String key, Collection<Long> records)
key in each of the records.
Navigates through the key splited with dot(.) operator.
Iterates only if the key has a link as value which
points to another record.public abstract <T> Map<Long,Set<T>> navigate(String key, Collection<Long> records, Timestamp timestamp)
key in each of the records
at timestamp.Navigates through the key splited with dot(.)
operator.
Iterates only if the key has a link as value which points to another record.
key - the field namerecords - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the records to a
Set containing all the values stored in the respective
fieldpublic abstract <T> Map<Long,Set<T>> navigate(String key, Criteria criteria)
key in every record that
matches the Criteria filter. Navigates through the key splited
with dot(.) operator.
Iterates only if the key has a link as value which points to another record.
public abstract <T> Map<Long,Set<T>> navigate(String key, Criteria criteria, Timestamp timestamp)
key in every record that
matches the Criteria filter. Navigates through the key splited
with dot(.) operator.
Iterates only if the key has a link as value which points to another record.
key - the field nameccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the the matching records to a
Set containing all the values stored in the respective
fieldpublic abstract <T> Map<Long,Set<T>> navigate(String key, long record)
key in record.Iterates
through the key splitted with dot(.) operator. Navigates only if the key
has a link as value which points to another record.key - the field namerecord - the record idMap containing record and all the values stored in the
fieldpublic abstract <T> Map<Long,Set<T>> navigate(String key, long record, Timestamp timestamp)
key in record at
timestamp. Navigates through the key splitted with dot(.)
operator. Iterates only if the key has a link as value which points to
another record.key - the field namerecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap containing all the values stored in the field at
timestamppublic final <T> Map<Long,Set<T>> navigate(String key, Long record)
key in record.Iterates
through the key splitted with dot(.) operator. Navigates only if the key
has a link as value which points to another record.key - the field namerecord - the record idMap containing record and all the values stored in the
fieldpublic final <T> Map<Long,Set<T>> navigate(String key, Long record, Timestamp timestamp)
key in record at
timestamp. Navigates through the key splitted with dot(.)
operator. Iterates only if the key has a link as value which points to
another record.key - the field namerecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap containing all the values stored in the field at
timestamppublic final <T> Map<Long,Set<T>> navigate(String key, Object criteria)
key in every record that
matches the Criteria filter. Navigates through the key splited
with dot(.) operator.
Iterates only if the key has a link as value which points to another record.
public final <T> Map<Long,Set<T>> navigate(String key, Object criteria, Timestamp timestamp)
key in every record that
matches the Criteria filter. Navigates through the key splited
with dot(.) operator.
Iterates only if the key has a link as value which points to another record.
key - the field nameccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the the matching records to a
Set containing all the values stored in the respective
fieldpublic abstract <T> Map<Long,Set<T>> navigate(String key, String ccl)
key in every record that
matches the ccl filter. Navigates through the key splited
with dot(.) operator.
Iterates only if the key has a link as value which points to another record.
public abstract <T> Map<Long,Set<T>> navigate(String key, String ccl, Timestamp timestamp)
key in every record that
matches the ccl filter. Navigates through the key splited
with dot(.) operator.
Iterates only if the key has a link as value which points to another record.
key - the field nameccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the the matching records to a
Set containing all the values stored in the respective
fieldpublic abstract Map<Long,Boolean> ping(Collection<Long> records)
records currently contains
any data.records - a collection of record idsMap associating each of the records to a
boolean that indicates whether that record currently contains any
data.public abstract boolean ping(long record)
record currently contains any data.record - the record idtrue if record currently contains any data,
otherwise falsepublic abstract <T> void reconcile(String key, long record, Collection<T> values)
key in
record so that it contains the exact same values as the
specified collection.key - the field namerecord - the record idvalues - the collection of values that should be exactly what is
contained in the field after this method executespublic final <T> void reconcile(String key, long record, T... values)
key in
record so that it contains the exact same values as the
specified array.key - the field namerecord - the record idvalues - the array of values that should be exactly what is
contained in the field after this method executespublic abstract <T> Map<Long,Boolean> remove(String key, T value, Collection<Long> records)
key as value from each of the
records where it currently exists.key - the field namevalue - the value to removerecords - a collection of record idsMap associating each of the records to a
boolean that indicates whether the data was removedpublic abstract <T> boolean remove(String key, T value, long record)
key as value from record if it currently
exists.key - the field namevalue - the value to removerecord - the record idtrue if the data is removedpublic abstract void revert(Collection<String> keys, Collection<Long> records, Timestamp timestamp)
keys in each of the records
to their state at timestamp by creating new revisions that undo
the net changes that have occurred since timestamp.keys - a collection of field namesrecords - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectpublic abstract void revert(Collection<String> keys, long record, Timestamp timestamp)
keys in record to their
state at timestamp by creating new revisions that undo the net
changes that have occurred since timestamp.keys - a collection of field namesrecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectpublic abstract void revert(String key, Collection<Long> records, Timestamp timestamp)
key in each of the records to its state
at timestamp by creating new revisions that undo the net
changes that have occurred since timestamp.key - the field namerecords - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectpublic abstract void revert(String key, long record, Timestamp timestamp)
key in record to its state at
timestamp by creating new revisions that undo the net
changes that have occurred since timestamp.key - the field namerecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectpublic abstract Set<Long> search(String key, String query)
query against the key
field and return the records that contain a String or Tag
value that matches.key - query - Set of ids for records that match the search querypublic abstract Map<Long,Map<String,Set<Object>>> select(Collection<Long> records)
records.public abstract Map<Long,Map<String,Set<Object>>> select(Collection<Long> records, Timestamp timestamp)
records at
timestamp.records - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the records to another
Map associating every key in that record at
timestamp to a Set containing all the values
stored in the respective field at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> select(Collection<String> keys, Collection<Long> records)
keys in each of the
records.public abstract <T> Map<Long,Map<String,Set<T>>> select(Collection<String> keys, Collection<Long> records, Timestamp timestamp)
keys in each of the
records at timestamp.keys - a collection of field namesrecords - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the records to another
Map associating each of the keys to a Set
containing all the values stored in the respective field at
timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> select(Collection<String> keys, Criteria criteria)
keys in every record
that matches the criteria.keys - a collection of field namescriteria - a Criteria that contains a
well-formed filter for the desired recordsMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective fieldpublic abstract <T> Map<Long,Map<String,Set<T>>> select(Collection<String> keys, Criteria criteria, Timestamp timestamp)
keys at
timestamp in every record that matches the criteriakeys - a collection of field namescriteria - a Criteria that contains a
well-formed filter for the desired recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective field at timestamppublic abstract <T> Map<String,Set<T>> select(Collection<String> keys, long record)
keys in
record.public abstract <T> Map<String,Set<T>> select(Collection<String> keys, long record, Timestamp timestamp)
keys in
record at timestamp.keys - a collection of field namesrecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the keys to a
Set containing all the values stored in the respective
field at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> select(Collection<String> keys, Object criteria)
keys in every record
that matches the criteria.
This method is syntactic sugar for select(Collection, Criteria).
The only difference is that this method takes a in-process
Criteria building sequence for convenience.
keys - a collection of field namescriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordsMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective fieldpublic abstract <T> Map<Long,Map<String,Set<T>>> select(Collection<String> keys, Object criteria, Timestamp timestamp)
keys at
timestamp in every record that matches the criteria.
This method is syntactic sugar for
select(Collection, Criteria, Timestamp). The only difference is
that this method takes a in-process Criteria building sequence
for convenience.
keys - a collection of field namescriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective field at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> select(Collection<String> keys, String ccl)
keys in every record
that matches the ccl filter.keys - a collection of field namesccl - a well-formed criteria expressed using the Concourse Criteria
LanguageMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective fieldpublic abstract <T> Map<Long,Map<String,Set<T>>> select(Collection<String> keys, String ccl, Timestamp timestamp)
keys at
timestamp in every record that matches the ccl filter.keys - a collection of field namesccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective field at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> select(Criteria criteria)
criteria.keys - a collection of field namescriteria - a Criteria that contains a well-formed filter for
the desired recordsMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective fieldpublic abstract <T> Map<Long,Map<String,Set<T>>> select(Criteria criteria, Timestamp timestamp)
timestamp from every record that
matches the criteria.keys - a collection of field namescriteria - a Criteria that contains a well-formed filter for
the desired recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective field at timestamppublic abstract Map<String,Set<Object>> select(long record, Timestamp timestamp)
record at timestamp.record - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each key in record to a
Set containing all the values stored in the respective
field at timestamppublic final Map<String,Set<Object>> select(Long record, Timestamp timestamp)
record at timestamp.record - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each key in record to a
Set containing all the values stored in the respective
field at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> select(Object criteria)
criteria.
This method is syntactic sugar for select(Criteria). The only
difference is that this method takes a in-process Criteria
building sequence for convenience.
keys - a collection of field namescriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordsMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective fieldpublic abstract <T> Map<Long,Map<String,Set<T>>> select(Object criteria, Timestamp timestamp)
timestamp from every record that
matches the criteria.
This method is syntactic sugar for select(Criteria, Timestamp).
The only difference is that this method takes a in-process
Criteria building sequence for convenience.
keys - a collection of field namescriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective field at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> select(String ccl)
ccl filter.keys - a collection of field namesccl - a well-formed criteria expressed using the Concourse Criteria
LanguageMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective fieldpublic abstract <T> Map<Long,Set<T>> select(String key, Collection<Long> records)
key in each of the records.public abstract <T> Map<Long,Set<T>> select(String key, Collection<Long> records, Timestamp timestamp)
key in each of the records
at timestamp.key - the field namerecords - a collection of record idstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the records to a
Set containing all the values stored in the respective
field at timestamppublic abstract <T> Map<Long,Set<T>> select(String key, Criteria criteria)
key in every record that
matches the criteria.public abstract <T> Map<Long,Set<T>> select(String key, Criteria criteria, Timestamp timestamp)
key at timestamp in
every record that matches the criteria.key - the field namecriteria - a Criteria that contains a well-formed filter for
the desired recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to a
Set containing all the values stored in the respective
field at timestamppublic abstract <T> Set<T> select(String key, long record)
key in record.key - the field namerecord - the record idSet containing all the values stored in the fieldpublic abstract <T> Set<T> select(String key, long record, Timestamp timestamp)
key in record at
timestamp.key - the field namerecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectSet containing all the values stored in the field at
timestamppublic final <T> Set<T> select(String key, Long record)
key in record.key - the field namerecord - the record idSet containing all the values stored in the fieldpublic final <T> Set<T> select(String key, Long record, Timestamp timestamp)
key in record at
timestamp.key - the field namerecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectSet containing all the values stored in the field at
timestamppublic abstract <T> Map<Long,Set<T>> select(String key, Object criteria)
key in every record that
matches the criteria.
This method is syntactic sugar for select(String, Criteria). The
only difference is that this method takes a in-process Criteria
building sequence for convenience.
key - the field namecriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordsMap associating each of the matching records to a
Set containing all the values stored in the respective
fieldpublic abstract <T> Map<Long,Set<T>> select(String key, Object criteria, Timestamp timestamp)
key at timestamp in
every record that matches the criteria.
This method is syntactic sugar for
select(String, Criteria, Timestamp). The only difference is that
this method takes a in-process Criteria building sequence for
convenience.
key - the field namecriteria - an in-process Criteria building sequence that
contains an unfinalized,
but well-formed filter for the desired
recordstimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to a
Set containing all the values stored in the respective
field at timestamppublic abstract <T> Map<Long,Set<T>> select(String key, String ccl)
key in every record that
matches the ccl filter.public abstract <T> Map<Long,Set<T>> select(String key, String ccl, Timestamp timestamp)
key at timestamp in
every record that matches the ccl filter.key - the field nameccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to a
Set containing all the values stored in the respective
field at timestamppublic abstract <T> Map<Long,Map<String,Set<T>>> select(String ccl, Timestamp timestamp)
timestamp from every record that
matches the ccl filter.keys - a collection of field namesccl - a well-formed criteria expressed using the Concourse Criteria
Languagetimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objectMap associating each of the matching records to another
Map associating each of the keys in that record
to a Set containing all the values stored in the
respective field at timestamppublic abstract void set(String key, Object value, Collection<Long> records)
records, atomically remove all the values stored
for key and then add key as value in the
respective record.key - the field namevalue - the value to setrecords - a collection of record idspublic abstract <T> void set(String key, T value, long record)
key in record
and add then key as value.key - the field namevalue - the value to setrecord - the record idpublic abstract void stage()
throws TransactionException
This method will turn on STAGING mode so that all subsequent changes are collected in an isolated buffer before possibly being committed to the database. Staged operations are guaranteed to be reliable, all or nothing units of work that allow correct recovery from failures and provide isolation between clients so the database is always in a consistent state.
After this method returns, all subsequent operations will be done in
staging mode until either abort() or commit()
is invoked.
All operations that occur within a transaction should be wrapped in a try-catch block so that transaction exceptions can be caught and the transaction can be properly aborted.
concourse.stage();
try {
concourse.get("foo", 1);
concourse.add("foo", "bar", 1);
concourse.commit();
}
catch (TransactionException e) {
concourse.abort();
}
TransactionExceptionpublic final boolean stage(Runnable task) throws TransactionException
task within a new transaction.
This method will automatically start a transaction for task and
attempt to commit. There is also logic to gracefully handle exceptions
that may result from any actions in the task.
task - a Runnable that contains the group of operations to
execute in the transactionTransactionExceptionpublic abstract Timestamp time()
Timestamp that represents the current instant according
to the server.public final Timestamp time(long micros)
Timestamp that corresponds to the specified number of
microseconds since the Unix epoch.micros - the number of microseconds since the unix epochTimestamp that represents the desired instantpublic final Timestamp time(Number micros)
Timestamp that corresponds to the specified number of
microseconds since the Unix epoch.micros - the number of microseconds since the unix epochTimestamp that represents the desired instantpublic abstract Timestamp time(String phrase)
Timestamp, according to the server, that corresponds
to the instant described by the phrase.phrase - a natural language description of a point in time.Timestamp that represents the desired instantpublic abstract boolean unlink(String key, long destination, long source)
key in source to
destination.key - the field namedestination - the id of the record where the link pointssource - the id of the record where the link originatestrue if the link is removedpublic abstract boolean verify(String key, Object value, long record)
true if value is stored for key in
record.key - the field namevalue - the value to checkrecord - the record idtrue if value is stored in the field, otherwise
falsepublic abstract boolean verify(String key, Object value, long record, Timestamp timestamp)
true if value was stored for key in
record at timestamp.key - the field namevalue - the value to checkrecord - the record idtimestamp - a Timestamp that represents the historical
instant to use in the lookup – created from either a
natural language
description of a point in time (i.e. two weeks ago), OR
the number
of microseconds since the Unix epoch, OR
a Joda
DateTime objecttrue if value is stored in the field, otherwise
falsepublic abstract boolean verifyAndSwap(String key, Object expected, long record, Object replacement)
expected with replacement for
key in record if and only if expected is
currently stored in the field.key - the field nameexpected - the value expected to currently exist in the fieldrecord - the record idreplacement - the value with which to replace expected if
and only if it currently exists in the fieldtrue if the swap is successfulpublic abstract void verifyOrSet(String key, Object value, long record)
key equals expected in
record or set it as such.
Please note that after returning, this method guarantees that key
in record will only contain value, even if value
already existed alongside other values [e.g. calling verifyOrSet("foo",
"bar", 1) will mean that "foo" in 1 only has "bar" as a value after
returning, even if "foo" in 1 already had "bar", "baz", and "apple" as
values].
So, basically, this function has the same guarantee as the
set(String, Object, long) method, except it will not create any
new revisions unless it is necessary to do so. The set
method, on the other hand, would indiscriminately clear all the values
for key in record before adding value, even if
value already existed.
If you want to add a new value only if it does not exist while also
preserving other values, you should use the
add(String, Object, long) method instead.
key - the field namevalue - the value to checkrecord - the record id