mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-28 20:47:49 +01:00
Compare commits
2 Commits
0c3524851e
...
fd62543687
| Author | SHA1 | Date | |
|---|---|---|---|
| fd62543687 | |||
| 757a0bbc8a |
34
.github/workflows/server.yml
vendored
34
.github/workflows/server.yml
vendored
@@ -236,3 +236,37 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: Run wrapper
|
name: Run wrapper
|
||||||
path: ~/run-wrapper.tar.gz
|
path: ~/run-wrapper.tar.gz
|
||||||
|
|
||||||
|
publish-javadoc:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
needs: [build-webui, build-dhfs]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: DHFS Javadocs
|
||||||
|
path: dhfs-javadocs-downloaded
|
||||||
|
|
||||||
|
- name: Setup Pages
|
||||||
|
uses: actions/configure-pages@v5
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
# Upload entire repository
|
||||||
|
path: 'dhfs-javadocs-downloaded'
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
package com.usatiuk.kleppmanntree;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
public class AtomicClock implements Clock<Long>, Serializable {
|
|
||||||
private long _max = 0;
|
|
||||||
|
|
||||||
public AtomicClock(long counter) {
|
|
||||||
_max = counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long getTimestamp() {
|
|
||||||
return ++_max;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTimestamp(Long timestamp) {
|
|
||||||
_max = timestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long peekTimestamp() {
|
|
||||||
return _max;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Long updateTimestamp(Long receivedTimestamp) {
|
|
||||||
var old = _max;
|
|
||||||
_max = Math.max(_max, receivedTimestamp) + 1;
|
|
||||||
return old;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user