Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sboikov committed Feb 3, 2015
1 parent c6ca063 commit 64645f6
Show file tree
Hide file tree
Showing 46 changed files with 546 additions and 776 deletions.
22 changes: 11 additions & 11 deletions modules/core/src/main/java/org/apache/ignite/IgniteQueue.java
Expand Up @@ -18,6 +18,7 @@
package org.apache.ignite;

import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.*;
import org.jetbrains.annotations.*;

import java.io.*;
Expand Down Expand Up @@ -147,40 +148,39 @@ public interface IgniteQueue<T> extends BlockingQueue<T>, Closeable {
*/
public void clear(int batchSize) throws IgniteException;

/**
* Removes this queue.
*
* @throws IgniteException if operation failed.
*/
@Override public void close() throws IgniteException;

/**
* Gets maximum number of elements of the queue.
*
* @return Maximum number of elements. If queue is unbounded {@code Integer.MAX_SIZE} will return.
* @throws IgniteCheckedException If operation failed.
*/
public int capacity() throws IgniteCheckedException;
public int capacity();

/**
* Returns {@code true} if this queue is bounded.
*
* @return {@code true} if this queue is bounded.
* @throws IgniteCheckedException If operation failed.
*/
public boolean bounded() throws IgniteCheckedException;
public boolean bounded();

/**
* Returns {@code true} if this queue can be kept on the one node only.
* Returns {@code false} if this queue can be kept on the many nodes.
*
* @return {@code true} if this queue is in {@code collocated} mode {@code false} otherwise.
* @throws IgniteCheckedException If operation failed.
*/
public boolean collocated() throws IgniteCheckedException;
public boolean collocated();

/**
* Gets status of queue.
*
* @return {@code true} if queue was removed from cache {@code false} otherwise.
*/
public boolean removed();

/**
* Removes this queue.
*/
@Override public void close();
}
55 changes: 48 additions & 7 deletions modules/core/src/main/java/org/apache/ignite/IgniteSet.java
Expand Up @@ -18,6 +18,7 @@
package org.apache.ignite;

import org.apache.ignite.configuration.*;
import org.jetbrains.annotations.*;

import java.io.*;
import java.util.*;
Expand All @@ -36,6 +37,52 @@
* @see Ignite#set(String, IgniteCollectionConfiguration, boolean)
*/
public interface IgniteSet<T> extends Set<T>, Closeable {
/** {@inheritDoc} */
@Override boolean add(T t) throws IgniteException;

/** {@inheritDoc} */
@Override boolean addAll(Collection<? extends T> c) throws IgniteException;

/** {@inheritDoc} */
@Override void clear() throws IgniteException;

/** {@inheritDoc} */
@Override boolean contains(Object o) throws IgniteException;

/** {@inheritDoc} */
@Override boolean containsAll(Collection<?> c) throws IgniteException;

/** {@inheritDoc} */
@Override boolean isEmpty() throws IgniteException;

/** {@inheritDoc} */
@Override Iterator<T> iterator() throws IgniteException;

/** {@inheritDoc} */
@Override boolean remove(Object o) throws IgniteException;

/** {@inheritDoc} */
@Override boolean removeAll(Collection<?> c) throws IgniteException;

/** {@inheritDoc} */
@Override boolean retainAll(Collection<?> c) throws IgniteException;

/** {@inheritDoc} */
@Override int size() throws IgniteException;

/** {@inheritDoc} */
@Override Object[] toArray() throws IgniteException;

/** {@inheritDoc} */
@Override <T1> T1[] toArray(T1[] a) throws IgniteException;

/**
* Removes this set.
*
* @throws IgniteException If operation failed.
*/
@Override public void close() throws IgniteException;

/**
* Gets set name.
*
Expand All @@ -48,19 +95,13 @@ public interface IgniteSet<T> extends Set<T>, Closeable {
* Returns {@code false} if this set can be kept on the many nodes.
*
* @return {@code True} if this set is in {@code collocated} mode {@code false} otherwise.
* @throws IgniteCheckedException If operation failed.
*/
public boolean collocated() throws IgniteCheckedException;
public boolean collocated();

/**
* Gets status of set.
*
* @return {@code True} if set was removed from cache {@code false} otherwise.
*/
public boolean removed();

/**
* Removes this set.
*/
@Override public void close();
}

This file was deleted.

Expand Up @@ -19,50 +19,12 @@

import org.apache.ignite.cache.*;

import static org.apache.ignite.cache.CacheAtomicityMode.*;
import static org.apache.ignite.cache.CacheDistributionMode.*;
import static org.apache.ignite.cache.CacheMemoryMode.*;
import static org.apache.ignite.cache.CacheMode.*;

/**
*
*/
public class IgniteCollectionConfiguration {
/** Default backups number. */
public static final int DFLT_BACKUPS = 0;

/** Default cache mode. */
public static final CacheMode DFLT_CACHE_MODE = PARTITIONED;

/** Default atomicity mode. */
public static final CacheAtomicityMode DFLT_ATOMICITY_MODE = ATOMIC;

/** Default memory mode. */
public static final CacheMemoryMode DFLT_MEMORY_MODE = ONHEAP_TIERED;

/** Default distribution mode. */
public static final CacheDistributionMode DFLT_DISTRIBUTION_MODE = PARTITIONED_ONLY;

/** Default off-heap storage size is {@code -1} which means that off-heap storage is disabled. */
public static final long DFLT_OFFHEAP_MEMORY = -1;

/** Off-heap memory size. */
private long offHeapMaxMem = DFLT_OFFHEAP_MEMORY;

/** Cache mode. */
private CacheMode cacheMode = DFLT_CACHE_MODE;

/** Cache distribution mode. */
private CacheDistributionMode distro = DFLT_DISTRIBUTION_MODE;

/** Number of backups. */
private int backups = DFLT_BACKUPS;

/** Atomicity mode. */
private CacheAtomicityMode atomicityMode = DFLT_ATOMICITY_MODE;

/** Memory mode. */
private CacheMemoryMode memMode = DFLT_MEMORY_MODE;
/** Cache name. */
private String cacheName;

/** */
private boolean collocated;
Expand All @@ -84,86 +46,16 @@ public void setCollocated(boolean collocated) {
}

/**
* @return Number of cache backups.
*/
public int getBackups() {
return backups;
}

/**
* @param backups Number of cache backups.
*/
public void setBackups(int backups) {
this.backups = backups;
}

/**
* @return Cache mode.
*/
public CacheMode getCacheMode() {
return cacheMode;
}

/**
* @param cacheMode Cache mode.
*/
public void setCacheMode(CacheMode cacheMode) {
this.cacheMode = cacheMode;
}

/**
* @return Cache atomicity mode.
*/
public CacheAtomicityMode getAtomicityMode() {
return atomicityMode;
}

/**
* @param atomicityMode Cache atomicity mode.
*/
public void setAtomicityMode(CacheAtomicityMode atomicityMode) {
this.atomicityMode = atomicityMode;
}

/**
* @return Cache memory mode.
*/
public CacheMemoryMode getMemoryMode() {
return memMode;
}

/**
* @param memMode Cache memory mode.
*/
public void setMemoryMode(CacheMemoryMode memMode) {
this.memMode = memMode;
}

/**
* @return Cache distribution mode.
*/
public CacheDistributionMode getDistributionMode() {
return distro;
}

/**
* @param distro Cache distribution mode.
*/
public void setDistributionMode(CacheDistributionMode distro) {
this.distro = distro;
}

/**
* @param offHeapMaxMem Maximum memory in bytes available to off-heap memory space.
* @return Cache name.
*/
public void setOffHeapMaxMemory(long offHeapMaxMem) {
this.offHeapMaxMem = offHeapMaxMem;
public String getCacheName() {
return cacheName;
}

/**
* @return Maximum memory in bytes available to off-heap memory space.
* @param cacheName Cache name.
*/
public long getOffHeapMaxMemory() {
return offHeapMaxMem;
public void setCacheName(String cacheName) {
this.cacheName = cacheName;
}
}
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

package org.apache.ignite.cache.datastructures;
package org.apache.ignite.datastructures;

import org.apache.ignite.*;
import org.jetbrains.annotations.*;
Expand Down
Expand Up @@ -19,13 +19,6 @@

import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.datastructures.*;
import org.apache.ignite.internal.processors.fs.*;
import org.apache.ignite.internal.processors.portable.*;
import org.apache.ignite.plugin.*;
import org.apache.ignite.internal.product.*;
import org.apache.ignite.internal.managers.security.*;
import org.apache.ignite.internal.managers.checkpoint.*;
import org.apache.ignite.internal.managers.collision.*;
import org.apache.ignite.internal.managers.communication.*;
Expand All @@ -44,6 +37,7 @@
import org.apache.ignite.internal.processors.closure.*;
import org.apache.ignite.internal.processors.continuous.*;
import org.apache.ignite.internal.processors.dataload.*;
import org.apache.ignite.internal.processors.datastructures.*;
import org.apache.ignite.internal.processors.email.*;
import org.apache.ignite.internal.processors.fs.*;
import org.apache.ignite.internal.processors.hadoop.*;
Expand Down
Expand Up @@ -19,13 +19,6 @@

import org.apache.ignite.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.datastructures.*;
import org.apache.ignite.internal.processors.fs.*;
import org.apache.ignite.internal.processors.portable.*;
import org.apache.ignite.internal.processors.streamer.*;
import org.apache.ignite.plugin.*;
import org.apache.ignite.internal.product.*;
import org.apache.ignite.internal.managers.checkpoint.*;
import org.apache.ignite.internal.managers.collision.*;
import org.apache.ignite.internal.managers.communication.*;
Expand All @@ -46,6 +39,7 @@
import org.apache.ignite.internal.processors.closure.*;
import org.apache.ignite.internal.processors.continuous.*;
import org.apache.ignite.internal.processors.dataload.*;
import org.apache.ignite.internal.processors.datastructures.*;
import org.apache.ignite.internal.processors.email.*;
import org.apache.ignite.internal.processors.fs.*;
import org.apache.ignite.internal.processors.hadoop.*;
Expand Down
Expand Up @@ -22,21 +22,6 @@
import org.apache.ignite.cache.affinity.*;
import org.apache.ignite.cluster.*;
import org.apache.ignite.configuration.*;
import org.apache.ignite.internal.processors.*;
import org.apache.ignite.internal.processors.cache.*;
import org.apache.ignite.internal.processors.datastructures.*;
import org.apache.ignite.internal.processors.portable.*;
import org.apache.ignite.internal.util.*;
import org.apache.ignite.lang.*;
import org.apache.ignite.lifecycle.*;
import org.apache.ignite.marshaller.*;
import org.apache.ignite.marshaller.optimized.*;
import org.apache.ignite.mxbean.*;
import org.apache.ignite.plugin.*;
import org.apache.ignite.internal.product.*;
import org.apache.ignite.spi.*;
import org.apache.ignite.spi.authentication.*;
import org.apache.ignite.spi.authentication.noop.*;
import org.apache.ignite.hadoop.*;
import org.apache.ignite.internal.managers.*;
import org.apache.ignite.internal.managers.checkpoint.*;
Expand All @@ -58,6 +43,7 @@
import org.apache.ignite.internal.processors.closure.*;
import org.apache.ignite.internal.processors.continuous.*;
import org.apache.ignite.internal.processors.dataload.*;
import org.apache.ignite.internal.processors.datastructures.*;
import org.apache.ignite.internal.processors.email.*;
import org.apache.ignite.internal.processors.job.*;
import org.apache.ignite.internal.processors.jobmetrics.*;
Expand Down

0 comments on commit 64645f6

Please sign in to comment.