Giter Club home page Giter Club logo

circular-buffer's People

Contributors

asgeirn avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

circular-buffer's Issues

missing repo details

Given:

<dependency>
    <groupId>no.twingine</groupId>
    <artifactId>circular-buffer</artifactId>
    <version>1.4</version>
</dependency>

When: mvn install

Then:

[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/no/twingine/circular-buffer/1.4/circular-buffer-1.4.pom
[WARNING] The POM for no.twingine:circular-buffer:jar:1.4 is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/no/twingine/circular-buffer/1.4/circular-buffer-1.4.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.265 s
[INFO] Finished at: 2023-12-01T05:17:15Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for xxx:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: no.twingi
ne:circular-buffer:jar:1.4 (absent): Could not find artifact no.twingine:circular-buffer:jar:1.4 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

Root cause is that there is no published version on maven central. That implies that I need to build it locally else publish it locally. Folks are unlikely to do that.

Publishing to maven is a little bit of a pain but not a ton. The important part is that you add a LICENSE.txt and that you use an maven group name that doesn't look like you are cybersquatting. There is some gpg key signing and sonatype release mavn plug-in setup. The first time you try to promote to live a human checks what you do. They were nice and told me to add a license and change my maven group name. After their manual checks for the first promotion after that it is automated when you sign and push a release to sonatype.

You should add a license file to this repo regardless as not having one means that people cannot use it who write software for clients who are aware of the legal risks of using software that has no defined opensource license.

Feature request - ordered read vs drain

Have a need to examine the contents of the circular buffer and build a list based on insert order.

Initially read your blog and the following snippet is based on your initial revision there.

public List<T> getAllOrdered() {
    List<T> list = new Vector<T>(size);
    for (int i = index.get() + 1; i < size; i++) {
        if(buffer.get(i) != null)
            list.add(buffer.get(i));
    }
    for (int i = 0; i < index.get() + 1; i++) 
        list.add(buffer.get(i));
    return list;
}  

The code might not be thread safe in that the buffer might get updated while I am building the list. Hoping I can download the code from github and use as a library with the above method included.

Regards
Suneet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.