001: /*
002: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
003: * notice. All rights reserved.
004: */
005: package com.tc.object.tx;
006:
007: import com.tc.management.beans.tx.ClientTxMonitorMBean;
008: import com.tc.object.ObjectID;
009: import com.tc.object.TCObject;
010: import com.tc.object.dmi.DmiDescriptor;
011: import com.tc.object.lockmanager.api.Notify;
012:
013: import java.util.Collection;
014: import java.util.Collections;
015: import java.util.List;
016: import java.util.Map;
017:
018: public class NullClientTransaction extends AbstractClientTransaction {
019:
020: public NullClientTransaction(TransactionID transactionID) {
021: super (transactionID);
022: }
023:
024: public boolean hasChangesOrNotifies() {
025: return false;
026: }
027:
028: public boolean hasChanges() {
029: return false;
030: }
031:
032: public Map getNewRoots() {
033: return Collections.EMPTY_MAP;
034: }
035:
036: protected void basicCreate(TCObject source) {
037: // null do nothing
038: }
039:
040: protected void basicCreateRoot(String name, ObjectID rootID) {
041: // null do nothing
042: }
043:
044: protected void basicFieldChanged(TCObject source, String classname,
045: String fieldname, Object newValue, int index) {
046: // null do nothing
047: }
048:
049: protected void basicLogicalInvoke(TCObject source, int method,
050: Object[] parameters) {
051: // null do nothing
052: }
053:
054: public boolean isNull() {
055: return true;
056: }
057:
058: public Map getChangeBuffers() {
059: return Collections.EMPTY_MAP;
060: }
061:
062: public void addNotify(Notify notify) {
063: return;
064: }
065:
066: public List addNotifiesTo(List notifies) {
067: return notifies;
068: }
069:
070: public boolean isConcurrent() {
071: return false;
072: }
073:
074: protected void basicArrayChanged(TCObject source, int startPos,
075: Object array, int length) {
076: // null do nothing
077: }
078:
079: public int getNotifiesCount() {
080: return 0;
081: }
082:
083: public void updateMBean(ClientTxMonitorMBean txMBean) {
084: // null do nothing
085: }
086:
087: protected void basicLiteralValueChanged(TCObject source,
088: Object newValue, Object oldValue) {
089: // do nothingg
090: }
091:
092: public Collection getReferencesOfObjectsInTxn() {
093: return Collections.EMPTY_LIST;
094: }
095:
096: public void addDmiDescritor(DmiDescriptor dd) {
097: return;
098: }
099:
100: public boolean hasDmiDescriptors() {
101: return false;
102: }
103:
104: public List getDmiDescriptors() {
105: return Collections.EMPTY_LIST;
106: }
107:
108: }
|