Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
briar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julian Dehm
briar
Commits
19b6afa6
Commit
19b6afa6
authored
8 years ago
by
str4d
Browse files
Options
Downloads
Patches
Plain Diff
Move new methods in Database interface to match existing alphabetic sorting
parent
7ac7fae3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
briar-core/src/org/briarproject/db/Database.java
+37
-37
37 additions, 37 deletions
briar-core/src/org/briarproject/db/Database.java
with
37 additions
and
37 deletions
briar-core/src/org/briarproject/db/Database.java
+
37
−
37
View file @
19b6afa6
...
...
@@ -82,6 +82,12 @@ interface Database<T> {
void
addMessage
(
T
txn
,
Message
m
,
State
state
,
boolean
shared
)
throws
DbException
;
/**
* Adds a dependency between two MessageIds
*/
void
addMessageDependency
(
T
txn
,
MessageId
dependentId
,
MessageId
dependencyId
)
throws
DbException
;
/**
* Records that a message has been offered by the given contact.
*/
...
...
@@ -266,6 +272,26 @@ interface Database<T> {
*/
Collection
<
LocalAuthor
>
getLocalAuthors
(
T
txn
)
throws
DbException
;
/**
* Returns the dependencies of the given message.
* This method makes sure that dependencies in different groups
* are returned as {@link ValidationManager.State.INVALID}. Note that this
* is not set on the dependencies themselves; the returned states should
* only be taken in the context of the given message.
* <p/>
* Read-only.
*/
Map
<
MessageId
,
State
>
getMessageDependencies
(
T
txn
,
MessageId
m
)
throws
DbException
;
/**
* Returns all IDs of messages that depend on the given message.
* <p/>
* Read-only.
*/
Map
<
MessageId
,
State
>
getMessageDependents
(
T
txn
,
MessageId
m
)
throws
DbException
;
/**
* Returns the IDs of all messages in the given group.
* <p/>
...
...
@@ -327,32 +353,21 @@ interface Database<T> {
throws
DbException
;
/**
* Returns the dependencies of the given message.
* This method makes sure that dependencies in different groups
* are returned as {@link ValidationManager.State.INVALID}. Note that this
* is not set on the dependencies themselves; the returned states should
* only be taken in the context of the given message.
* <p/>
* Read-only.
*/
Map
<
MessageId
,
State
>
getMessageDependencies
(
T
txn
,
MessageId
m
)
throws
DbException
;
/**
* Returns all IDs of messages that depend on the given message.
* Returns the IDs of some messages received from the given contact that
* need to be acknowledged, up to the given number of messages.
* <p/>
* Read-only.
*/
Map
<
MessageId
,
State
>
getMessage
Dependents
(
T
txn
,
Message
Id
m
)
Collection
<
MessageId
>
getMessage
sToAck
(
T
txn
,
ContactId
c
,
int
max
Message
s
)
throws
DbException
;
/**
* Returns the IDs of
some
messages
received from the given contact that
*
need to be acknowledged, up to the given number of messages
.
* Returns the IDs of
any
messages
that need to be delivered to the given
*
client
.
* <p/>
* Read-only.
*/
Collection
<
MessageId
>
getMessagesTo
Ack
(
T
txn
,
C
ontactId
c
,
int
maxMessages
)
Collection
<
MessageId
>
getMessagesTo
Deliver
(
T
txn
,
C
lientId
c
)
throws
DbException
;
/**
...
...
@@ -364,15 +379,6 @@ interface Database<T> {
Collection
<
MessageId
>
getMessagesToOffer
(
T
txn
,
ContactId
c
,
int
maxMessages
)
throws
DbException
;
/**
* Returns the IDs of some messages that are eligible to be sent to the
* given contact, up to the given total length.
* <p/>
* Read-only.
*/
Collection
<
MessageId
>
getMessagesToSend
(
T
txn
,
ContactId
c
,
int
maxLength
)
throws
DbException
;
/**
* Returns the IDs of some messages that are eligible to be requested from
* the given contact, up to the given number of messages.
...
...
@@ -383,21 +389,21 @@ interface Database<T> {
int
maxMessages
)
throws
DbException
;
/**
* Returns the IDs of
any
messages that
need to be validated by the given
*
client
.
* Returns the IDs of
some
messages that
are eligible to be sent to the
*
given contact, up to the given total length
.
* <p/>
* Read-only.
*/
Collection
<
MessageId
>
getMessagesTo
Validate
(
T
txn
,
C
lientId
c
)
Collection
<
MessageId
>
getMessagesTo
Send
(
T
txn
,
C
ontactId
c
,
int
maxLength
)
throws
DbException
;
/**
* Returns the IDs of any messages that need to be
deliver
ed
to
the given
* Returns the IDs of any messages that need to be
validat
ed
by
the given
* client.
* <p/>
* Read-only.
*/
Collection
<
MessageId
>
getMessagesTo
Deliver
(
T
txn
,
ClientId
c
)
Collection
<
MessageId
>
getMessagesTo
Validate
(
T
txn
,
ClientId
c
)
throws
DbException
;
/**
...
...
@@ -579,12 +585,6 @@ interface Database<T> {
void
setMessageState
(
T
txn
,
MessageId
m
,
State
state
)
throws
DbException
;
/**
* Adds a dependency between two MessageIds
*/
void
addMessageDependency
(
T
txn
,
MessageId
dependentId
,
MessageId
dependencyId
)
throws
DbException
;
/**
* Sets the reordering window for the given contact and transport in the
* given rotation period.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment