Skip to content

Commit 53be575

Browse files
timeckljacomet
authored andcommitted
removing unused code
git-svn-id: https://svn.terracotta.org/repo/tc/tc-messaging/branches/private/voltron@26038 7fc7bbf3-cf45-46d4-be06-341739edd864
1 parent 4284d43 commit 53be575

File tree

10 files changed

+10
-110
lines changed

10 files changed

+10
-110
lines changed

src/main/java/com/tc/management/remote/protocol/terracotta/L1JmxReady.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ public void initialize(UUID theUUID, String[] domains) {
4141
this.tunneledDomains = domains;
4242
}
4343

44-
public L1JmxReady createResponse() {
45-
L1JmxReady rv = (L1JmxReady) getChannel().createMessage(TCMessageType.CLIENT_JMX_READY_MESSAGE);
46-
rv.uuid = getUUID();
47-
return rv;
48-
}
49-
5044
@Override
5145
protected void dehydrateValues() {
5246
putNVPair(UUID, uuid.toString());

src/main/java/com/tc/net/protocol/tcm/TCMessageType.java

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ public final class TCMessageType {
5454
public static final int TYPE_COMPLETED_TRANSACTION_LOWWATERMARK_MESSAGE = 45;
5555
public static final int TYPE_GROUP_WRAPPER_MESSAGE = 46;
5656
public static final int TYPE_GROUP_HANDSHAKE_MESSAGE = 47;
57-
public static final int TYPE_NODES_WITH_OBJECTS_MESSAGE = 48;
58-
public static final int TYPE_NODES_WITH_OBJECTS_RESPONSE_MESSAGE = 49;
59-
public static final int TYPE_KEYS_FOR_ORPHANED_VALUES_MESSAGE = 50;
60-
public static final int TYPE_KEYS_FOR_ORPHANED_VALUES_RESPONSE_MESSAGE = 51;
61-
public static final int TYPE_NODE_META_DATA_MESSAGE = 52;
62-
public static final int TYPE_NODE_META_DATA_RESPONSE_MESSAGE = 53;
57+
// public static final int TYPE_NODES_WITH_OBJECTS_MESSAGE = 48;
58+
// public static final int TYPE_NODES_WITH_OBJECTS_RESPONSE_MESSAGE = 49;
59+
// public static final int TYPE_KEYS_FOR_ORPHANED_VALUES_MESSAGE = 50;
60+
// public static final int TYPE_KEYS_FOR_ORPHANED_VALUES_RESPONSE_MESSAGE = 51;
61+
// public static final int TYPE_NODE_META_DATA_MESSAGE = 52;
62+
// public static final int TYPE_NODE_META_DATA_RESPONSE_MESSAGE = 53;
6363
// public static final int TYPE_STRIPE_ID_MAP_MESSAGE = 54;
6464
public static final int TYPE_SYNC_WRITE_TRANSACTION_RECEIVED_MESSAGE = 55;
6565
public static final int TYPE_TUNNELED_DOMAINS_CHANGED_MESSAGE = 60;
66-
public static final int TYPE_NODES_WITH_KEYS_MESSAGE = 67;
67-
public static final int TYPE_NODES_WITH_KEYS_RESPONSE_MESSAGE = 68;
66+
// public static final int TYPE_NODES_WITH_KEYS_MESSAGE = 67;
67+
// public static final int TYPE_NODES_WITH_KEYS_RESPONSE_MESSAGE = 68;
6868
public static final int TYPE_INVALIDATE_OBJECTS_MESSAGE = 69;
6969
public static final int TYPE_CLIENT_HANDSHAKE_REFUSED_MESSAGE = 70;
7070
public static final int TYPE_RESOURCE_MANAGER_THROTTLE_STATE_MESSAGE = 71;
@@ -98,14 +98,6 @@ public final class TCMessageType {
9898
public static final TCMessageType COMPLETED_TRANSACTION_LOWWATERMARK_MESSAGE = new TCMessageType();
9999
public static final TCMessageType GROUP_WRAPPER_MESSAGE = new TCMessageType();
100100
public static final TCMessageType GROUP_HANDSHAKE_MESSAGE = new TCMessageType();
101-
public static final TCMessageType NODES_WITH_OBJECTS_MESSAGE = new TCMessageType();
102-
public static final TCMessageType NODES_WITH_OBJECTS_RESPONSE_MESSAGE = new TCMessageType();
103-
public static final TCMessageType NODES_WITH_KEYS_MESSAGE = new TCMessageType();
104-
public static final TCMessageType NODES_WITH_KEYS_RESPONSE_MESSAGE = new TCMessageType();
105-
public static final TCMessageType KEYS_FOR_ORPHANED_VALUES_MESSAGE = new TCMessageType();
106-
public static final TCMessageType KEYS_FOR_ORPHANED_VALUES_RESPONSE_MESSAGE = new TCMessageType();
107-
public static final TCMessageType NODE_META_DATA_MESSAGE = new TCMessageType();
108-
public static final TCMessageType NODE_META_DATA_RESPONSE_MESSAGE = new TCMessageType();
109101
public static final TCMessageType SYNC_WRITE_TRANSACTION_RECEIVED_MESSAGE = new TCMessageType();
110102
public static final TCMessageType TUNNELED_DOMAINS_CHANGED_MESSAGE = new TCMessageType();
111103
public static final TCMessageType INVALIDATE_OBJECTS_MESSAGE = new TCMessageType();
@@ -119,10 +111,6 @@ public static TCMessageType getInstance(final int i) {
119111
return typeMap.get(i);
120112
}
121113

122-
public static TCMessageType[] getAllMessageTypes() {
123-
return allTypes.clone();
124-
}
125-
126114
public int getType() {
127115
return this.type;
128116
}
@@ -142,7 +130,6 @@ public String toString() {
142130
//
143131
// //////////////////////////////////////////////////////
144132
private static final Map<Integer, TCMessageType> typeMap = new HashMap<Integer, TCMessageType>();
145-
private static final TCMessageType[] allTypes;
146133
private static final String typePrefix = "TYPE_";
147134

148135
private int type;
@@ -287,10 +274,10 @@ public int compare(TCMessageType o1, TCMessageType o2) {
287274

288275
return rv;
289276
}
290-
277+
291278
static {
292279
try {
293-
allTypes = init();
280+
init();
294281
} catch (final Exception e) {
295282
e.printStackTrace();
296283
throw new TCRuntimeException(e);

src/main/java/com/tc/object/LiteralValues.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import com.tc.util.Assert;
88
import com.tc.util.ClassUtils;
99

10-
import java.util.Collection;
1110
import java.util.Collections;
1211
import java.util.HashMap;
1312
import java.util.Map;
@@ -507,21 +506,4 @@ public static boolean isLiteralInstance(Object obj) {
507506
return i != OBJECT;
508507
}
509508

510-
// for tests
511-
public static Collection<String> getTypes() {
512-
return Collections.unmodifiableSet(literalsMap.keySet());
513-
}
514-
515-
/**
516-
* Calculate a stable hash code for the object. Many literals (like Integer) have stable
517-
* hash codes already, but some (like Class) do not.
518-
*
519-
* @param value must refer to an object for which {@link #isLiteralInstance()} returns true.
520-
* This implies that value must be non-null.
521-
*/
522-
public static int calculateDsoHashCode(Object value) {
523-
final LiteralValues type = valueFor(value);
524-
return type.calculateDsoHashCodeForLiteral(value);
525-
}
526-
527509
}

src/main/java/com/tc/object/TCObject.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
* Terracotta class attached to each shared instance Object
1313
*/
1414
public interface TCObject {
15-
/** Indicates null object identifier */
16-
public static final Long NULL_OBJECT_ID = Long.valueOf(-1);
17-
18-
/** Indicates null field index */
19-
public static final int NULL_INDEX = -1;
2015

2116
/**
2217
* Get the object identifier

src/main/java/com/tc/object/compression/StringCompressionUtil.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,14 +186,6 @@ public static byte[] uncompressBin(CompressedData data) {
186186
throw new AssertionError(e);
187187
}
188188
}
189-
190-
public static String uncompressedBinToString(byte[] uncompressedBytes) {
191-
try {
192-
return new String(uncompressedBytes, "UTF-8");
193-
} catch(UnsupportedEncodingException e) {
194-
throw new AssertionError(e.getMessage());
195-
}
196-
}
197189

198190

199191
/**

src/main/java/com/tc/object/dna/api/DNAEncoding.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,6 @@
1414
*/
1515
public interface DNAEncoding {
1616

17-
/**
18-
* When the policy is set to SERIALIZER then the DNAEncoding.decode() will return the exact Objects that where
19-
* encoded. For Example if UTF8ByteDataHolder is serialized to a stream, then when it is deserialized, you get an
20-
* UTF8ByteDataHolder object. Same goes for String or ClassHolder etc.
21-
* <p>
22-
* You may want such a policy in TCObjectInputStream, for example.
23-
*/
24-
public static final byte SERIALIZER = 0x00;
25-
/**
26-
* When the policy is set to STORAGE then the DNAEncoding.decode() may return Objects that represent the original
27-
* objects for performance/memory. For Example if String is serialized to a stream, then when it is deserialized, you
28-
* may get UTF8ByteDataHolder instead.
29-
* <p>
30-
* As the name says, you may want such a policy for storage in the L2.
31-
*/
32-
public static final byte STORAGE = 0x01;
33-
/**
34-
* When the policy is set to APPLICATOR then the DNAEncoding.decode() will return the original Objects that were
35-
* encoded in the original stream. For Example if UTF8ByteDataHolder is serialized to a stream, then when it is
36-
* deserialized, you get a String object.
37-
* <p>
38-
* You may want such a policy in TCObjectInputStream, for example.
39-
*/
40-
public static final byte APPLICATOR = 0x02;
41-
4217
/**
4318
* Encode an object onto an output stream
4419
*

src/main/java/com/tc/object/dna/impl/BaseDNAEncodingImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public abstract class BaseDNAEncodingImpl implements DNAEncodingInternal {
6868
protected static final byte TYPE_ID_ARRAY = 14;
6969
protected static final byte TYPE_ID_JAVA_LANG_CLASS = 15;
7070
protected static final byte TYPE_ID_JAVA_LANG_CLASS_HOLDER = 16;
71-
protected static final byte TYPE_ID_JAVA_LANG_CLASSLOADER = 20;
72-
protected static final byte TYPE_ID_JAVA_LANG_CLASSLOADER_HOLDER = 21;
7371
protected static final byte TYPE_ID_ENUM = 22;
7472
protected static final byte TYPE_ID_ENUM_HOLDER = 23;
7573
protected static final byte TYPE_ID_STRING_COMPRESSED = 25;

src/main/java/com/tc/object/locks/LongLockID.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ public String toString() {
3232
return getClass().getSimpleName() + "(" + id + ")";
3333
}
3434

35-
/**
36-
* @return String value of id value
37-
*/
38-
public String asString() {
39-
return Long.toString(id);
40-
}
41-
4235
@Override
4336
public int hashCode() {
4437
return ((int) id) ^ ((int) (id >>> 32));

src/main/java/com/tc/object/locks/StringLockID.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
public class StringLockID implements LockID {
1313
private static final long serialVersionUID = 0x159578a476cef87dL;
1414

15-
@Deprecated
16-
public final static StringLockID NULL_ID = new StringLockID("null id");
17-
1815
private String id;
1916

2017
public StringLockID() {
@@ -31,13 +28,6 @@ public StringLockID(final String id) {
3128
this.id = id;
3229
}
3330

34-
/**
35-
* @return String value of id value
36-
*/
37-
public String asString() {
38-
return this.id;
39-
}
40-
4131
@Override
4232
public String toString() {
4333
return getClass().getSimpleName() + "(" + this.id + ")";

src/main/java/com/tc/objectserver/dgc/api/GarbageCollectionInfo.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ public static enum Type {
3434
private long rescue2Time = NOT_INITIALIZED;
3535
private Type type = Type.NULL_GC;
3636

37-
public static final GarbageCollectionInfo NULL_INFO = new GarbageCollectionInfo(
38-
new GarbageCollectionID(
39-
NULL_INITIALIZED,
40-
"NULL INITIALIZED"),
41-
Type.NULL_GC);
42-
4337
public GarbageCollectionInfo() {
4438
// for serialization
4539
}

0 commit comments

Comments
 (0)