Skip to content

Commit

Permalink
JAVA-893: deprecate classes and methods that will be excluded from 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
trnl committed Aug 15, 2013
1 parent 3f0c66c commit 58c6763
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/com/mongodb/Bytes.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class Bytes extends BSON {
* Tailable means cursor is not closed when the last data is retrieved.
* Rather, the cursor marks the final object's position.
* You can resume using the cursor later, from where it was located, if more data were received.
* Like any "latent cursor", the cursor may become invalid at some point (CursorNotFound) for example if the final object it references were deleted.
* Like any "latent cursor", the cursor may become invalid at some point (CursorNotFound) - for example if the final object it references were deleted.
*/
public static final int QUERYOPTION_TAILABLE = 1 << 1;
/**
Expand Down
3 changes: 3 additions & 0 deletions src/main/com/mongodb/DBPort.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@
* represents a Port to the database, which is effectively a single connection to a server
* Methods implemented at the port level should throw the raw exceptions like IOException,
* so that the connector above can make appropriate decisions on how to handle.
*
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public class DBPort {

/**
Expand Down
3 changes: 3 additions & 0 deletions src/main/com/mongodb/DBPortPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@

/**
* This class is NOT part of the public API. Be prepared for non-binary compatible changes in minor releases.
*
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public class DBPortPool extends SimplePool<DBPort> {

public String getHost() {
Expand Down
3 changes: 3 additions & 0 deletions src/main/com/mongodb/MongoOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
*
* @see MongoClientOptions
* @see MongoClient
*
* @deprecated Replaced by {@link MongoClientOptions}.
*/
@Deprecated
public class MongoOptions {

@Deprecated
Expand Down
7 changes: 7 additions & 0 deletions src/main/com/mongodb/QueryOperators.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,11 @@ public class QueryOperators {
public static final String SHOW_DISK_LOC = "$showDiskLoc";
public static final String HINT = "$hint";
public static final String COMMENT = "$comment";

/**
* @deprecated Utility classes should not have a public or default constructor.
*/
@Deprecated
public QueryOperators() {
}
}
3 changes: 3 additions & 0 deletions src/main/com/mongodb/RawDBObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@

/**
* This object wraps the binary object format ("BSON") used for the transport of serialized objects to / from the Mongo database.
*
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public class RawDBObject implements DBObject {

RawDBObject( ByteBuffer buf ){
Expand Down
8 changes: 8 additions & 0 deletions src/main/com/mongodb/io/ByteBufferFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@

import java.nio.ByteBuffer;

/**
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public interface ByteBufferFactory {
public ByteBuffer get();

/**
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public static class SimpleHeapByteBufferFactory implements ByteBufferFactory {
public SimpleHeapByteBufferFactory( int size ){
_size = size;
Expand Down
4 changes: 4 additions & 0 deletions src/main/com/mongodb/io/ByteBufferHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
import java.util.ArrayList;
import java.util.List;

/**
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public class ByteBufferHolder {

public ByteBufferHolder(){
Expand Down
4 changes: 4 additions & 0 deletions src/main/com/mongodb/io/ByteBufferInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
import java.nio.ByteBuffer;
import java.util.List;

/**
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public class ByteBufferInputStream extends InputStream {

public ByteBufferInputStream( List<ByteBuffer> lst ){
Expand Down
4 changes: 4 additions & 0 deletions src/main/com/mongodb/io/ByteBufferOutputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
import java.util.ArrayList;
import java.util.List;

/**
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public class ByteBufferOutputStream extends OutputStream {

public ByteBufferOutputStream(){
Expand Down
4 changes: 4 additions & 0 deletions src/main/com/mongodb/io/ByteStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

import java.nio.ByteBuffer;

/**
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public interface ByteStream {

public boolean hasMore();
Expand Down
4 changes: 4 additions & 0 deletions src/main/com/mongodb/util/MyAsserts.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
@Deprecated
public class MyAsserts {

/**
* @deprecated This class is NOT a part of public API and will be dropped in 3.x versions.
*/
@Deprecated
public static class MyAssert extends RuntimeException {

private static final long serialVersionUID = -4415279469780082174L;
Expand Down
3 changes: 2 additions & 1 deletion src/main/com/mongodb/util/SimplePool.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
import java.util.concurrent.TimeUnit;

/**
* This class is NOT part of the public API. Be prepared for non-binary compatible changes in minor releases.
* @deprecated This class is NOT a part of public API and will be dropped in 3.x versions.
*/
@Deprecated
public abstract class SimplePool<T> {

/** Initializes a new pool of objects.
Expand Down
4 changes: 4 additions & 0 deletions src/main/org/bson/BSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,10 @@ private static boolean _anyHooks(){
static ClassMap<List<Transformer>> _decodingHooks =
new ClassMap<List<Transformer>>();

/**
* @deprecated Use {@link Charset#forName(String)} to create UTF-8 charset.
*/
@Deprecated
static protected Charset _utf8 = Charset.forName( "UTF-8" );

// ----- static encode/decode -----
Expand Down
3 changes: 3 additions & 0 deletions src/main/org/bson/BSONLazyDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
/**
*
* @author antoine
*
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public class BSONLazyDecoder {

}
3 changes: 3 additions & 0 deletions src/main/org/bson/NewBSONDecoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@

/**
* A new implementation of the bson decoder.
*
* @deprecated This class is NOT a part of public API and will be propped in 3.x versions.
*/
@Deprecated
public class NewBSONDecoder implements BSONDecoder {

@Override
Expand Down

0 comments on commit 58c6763

Please sign in to comment.