Skip to content

Commit

Permalink
Prepare release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pron committed Jan 22, 2014
1 parent e382589 commit a4c8233
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ branches:
env:
global:
- secure: "NTxp50e11DMSJH1ApQbjlBxY4bcsLAGSw3mYzodOlceybMBh+hbpiAmqBpCZ9878wm5AZcPVq6ULzB47IrdfQG3Xn3SybwWLWpZRI3B0eaqoyhk71J5Uuu9rr+xXoD1C1q/TV1Z0Zf5unR1jz5DmUZ5En8yf4lZ4MI7gft6tDFI="
- DOCS_BRANCH=""
- DOCS_BRANCH="0.4.0"
- GEN_APIDOCS="gradle javadoc"

after_success:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ subprojects {
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'

group = "co.paralleluniverse"
version = "0.4.0-SNAPSHOT"
version = "0.4.0"
status = "integration"
description = "lightweight threads and actors for the JVM."
ext.url = "http://puniverse.github.com/quasar"
Expand Down Expand Up @@ -330,7 +330,7 @@ project (':quasar-galaxy') {
compile project(':quasar-core')
compile project(':quasar-actors')

compile ("co.paralleluniverse:galaxy:1.2.1")
compile ("co.paralleluniverse:galaxy:1.3")
}

tasks.withType(JavaExec) {
Expand Down
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Quasar is developed by [Parallel Universe] and released as free software, dual-l
* [Guava](https://code.google.com/p/guava-libraries/) --- Java utility classes, by Google
* [SLF4J](http://www.slf4j.org/) --- Simple Logging Facade for Java (SLF4J)

Quasar's clustering makes use of [Galaxy](http://puniverse.github.io/galaxy/), by Parallel Universe
Quasar's clustering makes use of [Galaxy](http://docs.paralleluniverse.co/galaxy/), by Parallel Universe

### Acknowledgments

Expand Down Expand Up @@ -885,13 +885,13 @@ Because records are intended to control mutability, an `ObjectField` should neve

{% capture examples %}https://github.com/{{site.github}}/tree/master/src/test/java/co/paralleluniverse/pulsar/examples{% endcapture %}

Quasar is able to run on a cluster, thereby letting actors and channels communicate across machines. The Quasar cluster runs on top of [Galaxy](http://puniverse.github.io/galaxy/), Parallel Universe's in-memory data grid.
Quasar is able to run on a cluster, thereby letting actors and channels communicate across machines. The Quasar cluster runs on top of [Galaxy](http://docs.paralleluniverse.co/galaxy/), Parallel Universe's in-memory data grid.

In this version, clustering is pretty rudimentary, but essential features should work: actors can be made discoverable on the network, messages can be passed among actors on different nodes, and an actor on a failing node will behave as expected of a dying actor with respect to exit messages sent to other, remote, *watching* it or *linked* to it.

### Enabling Clustering

First, you will need to add the `co.paralleluniverse:quasar-galaxy` artifact as a dependency to your project, and set some Galaxy cluster properties. At the very least you will need to set `"galaxy.nodeId"`, which will have to be a different `short` value for each master node. If you're running several nodes on the same machine, you will also need to set `"galaxy.port"` and `"galaxy.slave_port"`. These properties can be set in several ways. The simplest is to define them as JVM system properties (as `-D` command line arguments).However, you can also set them in the Galaxy configuration XML files or in a properties file. Please refer to the [Galaxy documentation](http://puniverse.github.io/galaxy/) for more detail
First, you will need to add the `co.paralleluniverse:quasar-galaxy` artifact as a dependency to your project, and set some Galaxy cluster properties. At the very least you will need to set `"galaxy.nodeId"`, which will have to be a different `short` value for each master node. If you're running several nodes on the same machine, you will also need to set `"galaxy.port"` and `"galaxy.slave_port"`. These properties can be set in several ways. The simplest is to define them as JVM system properties (as `-D` command line arguments).However, you can also set them in the Galaxy configuration XML files or in a properties file. Please refer to the [Galaxy documentation](http://docs.paralleluniverse.co/galaxy/) for more detail.

Then, to make an actor discoverable cluster-wide, all you need to do is register it with the [`register`]({{javadoc}}/actors/Actor.html#register()) method of the `Actor` class.

Expand All @@ -901,7 +901,7 @@ An actor doesn't have to be registered in order to be reachable on the network.

### Cluster Configuration

For instructions on how to configure the Galaxy cluster, please refere to Galaxy's [getting started guide](http://puniverse.github.io/galaxy/start/getting-started.html).
For instructions on how to configure the Galaxy cluster, please refere to Galaxy's [getting started guide](http://docs.paralleluniverse.co/galaxy/start/getting-started.html).

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import co.paralleluniverse.common.io.Persistable;
import co.paralleluniverse.fibers.SuspendExecution;
import co.paralleluniverse.galaxy.CacheListener;
import co.paralleluniverse.galaxy.InvokeOnLine;
import co.paralleluniverse.galaxy.ItemState;
import co.paralleluniverse.galaxy.LineFunction;
import co.paralleluniverse.galaxy.StoreTransaction;
import co.paralleluniverse.galaxy.TimeoutException;
import java.nio.ByteBuffer;
Expand Down Expand Up @@ -458,7 +458,7 @@ public interface Store {
*/
void del(long id, StoreTransaction txn) throws TimeoutException, SuspendExecution;

<T> T invoke(long id, InvokeOnLine<T> function) throws TimeoutException, SuspendExecution;
<T> T invoke(long id, LineFunction<T> function) throws TimeoutException, SuspendExecution;

/**
* Makes the given item available in the given nodes' cache. <br/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import co.paralleluniverse.fibers.SuspendExecution;
import co.paralleluniverse.fibers.futures.AsyncListenableFuture;
import co.paralleluniverse.galaxy.CacheListener;
import co.paralleluniverse.galaxy.InvokeOnLine;
import co.paralleluniverse.galaxy.ItemState;
import co.paralleluniverse.galaxy.LineFunction;
import co.paralleluniverse.galaxy.StoreTransaction;
import co.paralleluniverse.galaxy.TimeoutException;
import co.paralleluniverse.strands.Strand;
Expand Down Expand Up @@ -164,7 +164,7 @@ public void set(long id, Persistable object, StoreTransaction txn) throws Timeou
}

@Override
public <T> T invoke(long id, InvokeOnLine<T> function) throws TimeoutException, SuspendExecution {
public <T> T invoke(long id, LineFunction<T> function) throws TimeoutException, SuspendExecution {
return result(store.invokeAsync(id, function));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import co.paralleluniverse.actors.GlobalRegistry;
import co.paralleluniverse.actors.LocalActor;
import co.paralleluniverse.fibers.SuspendExecution;
import co.paralleluniverse.galaxy.Cache;
import co.paralleluniverse.galaxy.CacheListener;
import co.paralleluniverse.galaxy.StoreTransaction;
import co.paralleluniverse.galaxy.TimeoutException;
Expand Down Expand Up @@ -146,17 +147,17 @@ private <Message> ActorRef<Message> getRootFromStoreAndUpdateCache(final String
}
store.setListener(root, new CacheListener() {
@Override
public void invalidated(long id) {
evicted(id);
public void invalidated(Cache cache, long id) {
evicted(cache, id);
}

@Override
public void received(long id, long version, ByteBuffer data) {
evicted(id);
public void received(Cache cache, long id, long version, ByteBuffer data) {
evicted(cache, id);
}

@Override
public void evicted(long id) {
public void evicted(Cache cache, long id) {
rootCache.remove(rootName);
store.setListener(id, null);
}
Expand Down

0 comments on commit a4c8233

Please sign in to comment.